Package org.eclipse.persistence.jaxb
Class TypeMappingInfo
- java.lang.Object
-
- org.eclipse.persistence.jaxb.TypeMappingInfo
-
public class TypeMappingInfo extends java.lang.ObjectPurpose: Provides a wrapper for a java type to be used when creating a JAXB context. This allows for additional information (such as parameter level annotations and element tag names) to be included in addition to the type itself.
- Author:
- mmacivor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeMappingInfo.ElementScope
-
Constructor Summary
Constructors Constructor Description TypeMappingInfo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.annotation.Annotation[]getAnnotations()Representing parameter level annotations that should be applied to this type.TypeMappingInfo.ElementScopegetElementScope()Indicates if a global element should be generated for this type.javax.xml.namespace.QNamegetSchemaType()INTERNAL: Indicates the schema type to be used during marshaljava.lang.reflect.TypegetType()The type to be bound.org.eclipse.persistence.internal.oxm.mappings.DescriptorgetXmlDescriptor()INTERNAL Returns the Descriptor associated with this TypeMappingInfo.org.w3c.dom.ElementgetXmlElement()Returns the xml-element as aElementwhich represents the parameter level annotations that should be applied to this type.javax.xml.namespace.QNamegetXmlTagName()Root element name associated with this type;booleanisNillable()Return if the global element will be marked as nillablevoidsetAnnotations(java.lang.annotation.Annotation[] annotations)voidsetElementScope(TypeMappingInfo.ElementScope scope)voidsetNillable(boolean nillable)Set if the global element should be marked as nillablevoidsetType(java.lang.reflect.Type t)voidsetXmlDescriptor(org.eclipse.persistence.internal.oxm.mappings.Descriptor xmlDescriptor)INTERNAL Sets the Descriptor associated with this TypeMappingInfo.voidsetXmlElement(org.w3c.dom.Element xmlElement)Set the xml-elementElementrepresenting parameter level annotations that should be applied to this type.voidsetXmlTagName(javax.xml.namespace.QName tagName)
-
-
-
Method Detail
-
getSchemaType
public javax.xml.namespace.QName getSchemaType()
INTERNAL: Indicates the schema type to be used during marshal
-
getElementScope
public TypeMappingInfo.ElementScope getElementScope()
Indicates if a global element should be generated for this type.
-
setElementScope
public void setElementScope(TypeMappingInfo.ElementScope scope)
-
isNillable
public boolean isNillable()
Return if the global element will be marked as nillable- Returns:
-
setNillable
public void setNillable(boolean nillable)
Set if the global element should be marked as nillable- Parameters:
nillable-
-
getXmlTagName
public javax.xml.namespace.QName getXmlTagName()
Root element name associated with this type;
-
setXmlTagName
public void setXmlTagName(javax.xml.namespace.QName tagName)
-
getType
public java.lang.reflect.Type getType()
The type to be bound.
-
setType
public void setType(java.lang.reflect.Type t)
-
getAnnotations
public java.lang.annotation.Annotation[] getAnnotations()
Representing parameter level annotations that should be applied to this type.
-
setAnnotations
public void setAnnotations(java.lang.annotation.Annotation[] annotations)
-
getXmlDescriptor
public org.eclipse.persistence.internal.oxm.mappings.Descriptor getXmlDescriptor()
INTERNAL Returns the Descriptor associated with this TypeMappingInfo. This is set when the metadata is initialized.
-
setXmlDescriptor
public void setXmlDescriptor(org.eclipse.persistence.internal.oxm.mappings.Descriptor xmlDescriptor)
INTERNAL Sets the Descriptor associated with this TypeMappingInfo. This is set when the metadata is initialized.
-
getXmlElement
public org.w3c.dom.Element getXmlElement()
Returns the xml-element as aElementwhich represents the parameter level annotations that should be applied to this type.- Returns:
Elementwhich represents the parameter level annotations that should be applied to this type if set, otherwise null
-
setXmlElement
public void setXmlElement(org.w3c.dom.Element xmlElement)
Set the xml-elementElementrepresenting parameter level annotations that should be applied to this type. IfxmlElementis non-null, any annotations set on this instance will be completely ignored. The following XML representations of parameter level annotations will be supported:- xml-element
- xml-attachment-ref
- xml-list
- xml-mime-type
- xml-java-type-adapter
- Parameters:
xmlElement-Elementcreated from an xml-element- See Also:
Element,XmlElement
-
-