java.lang.Object
org.eclipse.persistence.jaxb.compiler.TypeInfo
- Direct Known Subclasses:
EnumTypeInfo
INTERNAL:
Purpose:Used to store meta data about JAXB 2.0 Annotated classes during schema and mapping generation processes.
Responsibilities:
- Store information about Class Name and the associated Schema Type name
- Store information about Property Order for mapping and schema generation
- Store information about XmlAdapters, XmlAccessType and other JAXB 2.0 annotation artifacts
- Since:
- Oracle TopLink 11.1.1.0.0
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPackageLevelAdapterClass
(JavaClass adapterClass, JavaClass boundType) Put a bound type class to adapter class entry in the Map.void
addProperty
(String name, Property property) Put a Property in the Map of Properties for this TypeInfo.void
addXmlKeyProperty
(Property xmlKeyProp) Add an XmlKey property to the list.Return a Map of property names to list of properties.Return the name of the XmlAnyAttribute property, if one is set.Return the name of the XmlAnyElement property, if one is set.Return the ClassExtractor class name.Return the XmlDescriptor set on this TypeInfo.Return the XmlElementRefs property name, if one has been set.String[]
Return the TypeProperty 'idProperty'.Return the JavaClass name for this typeinfo.Return all non-transient properties that exist in the propOrder array.Return the list of original properties for this type info.getPackageLevelAdapterClass
(String boundTypeName) Return the xmladapter class for a given bound type class name.getPackageLevelAdapterClass
(JavaClass boundType) Return the xmladapter class for a given bound type class.Return the Map of XmlAdapters for this TypeInfo.INTERNAL: Return the list of predicate properties.Return the Map of Properties for this TypeInfo.String[]
Return the Map of user-defined properties.Return the xmlAccessOrder for this TypeInfo.Return the xmlAccessType for this TypeInfo.Return the XmlCustomizer class name set on this TypeInfo, or null if none is set.Return the class indicator field name for this type info.Return the value of the class indicator field for the java-type associated with this type info.Return the xmlJavaTypeAdapter set on this Type.Return the list of XmlKey property entries.Return the XMLNameTransformer used when converting Java names to XML namesReturn XmlNullPolicy for this TypeInfo.Return the xmlRootElement set on this TypeInfo.Return the List of XmlSeeAlso class names for this TypeInfo.Return the xmlType set on this TypeInfo.boolean
Indicates if this TypeInfo contains an XmlElementRefs property.boolean
INTERNAL: Return true if the list of predicate properties hasn't been initialized.boolean
hasPredicateProperty
(Property property) INTERNAL: Return true if the property handed in is a duplicate of any existing predicate property.boolean
boolean
Indicates if the list of XmlKey property entries has been set, i.e.boolean
boolean
Indicates if all binary data types are to be inlined for this class.boolean
boolean
Indicates if this type info represents an enumeration.boolean
isIDSet()
Indicates if an @XmlID is set on a field/property.boolean
boolean
isMixed()
Indicates mixed contentboolean
Indicates if this TypeInfo has completed the postBuildTypeInfo phase of processing.boolean
Indicates if this TypeInfo has completed the preBuildTypeInfo phase of processing.boolean
Indicates if the name of the XmlAnyAttribute property has been set.boolean
Indicates if the name of the XmlAnyElement property has been set.boolean
Indicates if a ClassExtractor class name is set, i.e.boolean
Indicates that the propOrder has been set, i.e.boolean
Indicates if xmlAccessOrder has been set, i.e.boolean
Indicates if xmlAccessType has been set, i.e.boolean
Indicates if the class indicator field name is set, i.e.boolean
Indicates if a class indicator field value has been set, i.e.boolean
Indicates if an XmlJavaTypeAdapter has been set, i.e.boolean
Indicates if xmlRootElement has been set, i.e.boolean
Indicates if xmlSeeAlso has been set, i.e.boolean
Indicates if XmlTransient is set.boolean
Indicates if xmlType has been set, i.e.boolean
Indicates if an xmlValueProperty is set on this TypeInfo, i.e.boolean
Indicates if the class represented by this TypeInfo is marked XmlTransient.boolean
Indicates if XmlElementNillable is set.void
Order the properties based on the XmlAccessOrder, if set.void
setAnyAttributePropertyName
(String anyAttributePropertyName) Set the name of the XmlAnyAttribute propertyvoid
setAnyElementPropertyName
(String anyElementPropertyName) Set the name of the XmlAnyElement propertyvoid
setClassExtractorName
(String classExtractorName) Set the ClassExtractor class name.void
setClassNamespace
(String namespace) void
setComplexType
(ComplexType type) void
setCompositor
(TypeDefParticle particle) void
setDescriptor
(Descriptor desc) Set the XmlDescriptor on this TypeInfo.void
setElementRefsPropertyName
(String propName) Set the XmlElementRefs property name.void
setFactoryMethodName
(String factoryMethod) void
setFactoryMethodParamTypes
(String[] paramTypes) void
setIDProperty
(Property idProperty) Sets the TypeProperty 'idProperty'.void
setInlineBinaryData
(boolean isBinaryDataInlined) Sets the flag that indicates if all binary data types are to be inlined for this class.void
setJavaClass
(JavaClass javaClass) void
setJavaClassName
(String javaClassName) Set the JavaClass name for this typeinfo.void
setLocationAware
(boolean value) void
setMixed
(boolean isMixed) Set mixed content indicatorvoid
setObjectFactoryClassName
(String factoryClass) void
setPackageLevelXmlAccessorFactory
(AccessorFactoryWrapper packageLevelXmlAccessorFactory) void
setPostBuilt
(boolean isPostBuilt) Set indicator that this TypeInfo has completed the postBuildTypeInfo phase of processing.void
setPreBuilt
(boolean isPreBuilt) Set indicator that this TypeInfo has completed the preBuildTypeInfo phase of processing.void
setProperties
(ArrayList<Property> properties) Set the Map of Properties for this TypeInfo.void
setPropOrder
(String[] order) void
void
setSchemaTypeName
(String typeName) void
setSimpleType
(SimpleType type) void
setTransient
(boolean isTransient) Used to indicate that the class represented by this TypeInfo is marked XmlTransient.void
setUserProperties
(Map<Object, Object> userProperties) Set the Map of user-defined properties.void
setXmlAccessOrder
(XmlAccessOrder xmlAccessOrder) Set the xmlAccessOrder for this TypeInfo.void
setXmlAccessorFactory
(AccessorFactoryWrapper xmlAccessorFactory) void
setXmlAccessType
(XmlAccessType xmlAccessType) Set the xmlAccessType for this TypeInfo.void
setXmlCustomizer
(String xmlCustomizerClassName) Sets the XmlCustomizer class name on this TypeInfo.void
setXmlDiscriminatorNode
(String xmlDiscriminatorNode) Sets the class indicator field name (for use with inheritance).void
setXmlDiscriminatorValue
(String xmlDiscriminatorValue) Set the value of the class indicator field for the java-type associated with this type info.void
setXmlElementNillable
(boolean isXmlElementNillable) Set the XmlElementNillable for this TypeInfo.void
setXmlJavaTypeAdapter
(XmlJavaTypeAdapter xmlJavaTypeAdapter) Set an XmlJavaTypeAdapter on this Type.void
setXmlNameTransformer
(XMLNameTransformer xmlNameTransformer) Set the XMLNameTransformer used when converting Java names to XML namesvoid
setXmlNullPolicy
(XmlNullPolicy xmlNullPolicy) Set the XmlNullPolicy for this TypeInfo.void
setXmlRootElement
(XmlRootElement xmlRootElement) Set the xmlRootElement for this TypeInfo.void
setXmlSeeAlso
(List<String> xmlSeeAlso) Set the List of XmlSeeAlso class names for this TypeInfo.void
setXmlTransient
(boolean isTransient) Set the XmlTransient for this TypeInfo.void
setXmlType
(XmlType xmlType) Set the xmlType for this TypeInfo.void
setXmlValueProperty
(Property xmlValueProperty) void
setXmlVirtualAccessMethods
(XmlVirtualAccessMethods xmlExtensible)
-
Field Details
-
DEFAULT_NAME_TRANSFORMER
-
-
Constructor Details
-
TypeInfo
This constructor sets the Helper to be used throughout XML and Annotations processing. Other fields are initialized here as well.
-
-
Method Details
-
getDescriptor
Return the XmlDescriptor set on this TypeInfo.- Returns:
- the XmlDescriptor set on this TypeInfo, or null if none
-
setDescriptor
Set the XmlDescriptor on this TypeInfo. -
getComplexType
-
setComplexType
-
getSimpleType
-
setSimpleType
-
getPropOrder
-
isSetPropOrder
public boolean isSetPropOrder()Indicates that the propOrder has been set, i.e. is non-null- Returns:
- true if propOrder is non-null, false otherwise
-
setPropOrder
-
getClassNamespace
-
setClassNamespace
-
isComplexType
public boolean isComplexType() -
isMixed
public boolean isMixed()Indicates mixed content -
setMixed
public void setMixed(boolean isMixed) Set mixed content indicator -
getCompositor
-
setCompositor
-
getPropertyNames
-
getIDProperty
Return the TypeProperty 'idProperty'. This method will typically be used in conjunction with isIDSet method to determine if an @XmlID exists, and hence 'idProperty' is non-null. -
getProperties
Return the Map of Properties for this TypeInfo. -
addProperty
Put a Property in the Map of Properties for this TypeInfo. Here, the original property is put in the originalProperties map, the properties map, and the propertyList list. It is assumed that the originalProperties map will remain unchanged during processing. -
setIDProperty
Sets the TypeProperty 'idProperty'. This indicates that an @XmlID annotation is set on a given field/method. -
setProperties
Set the Map of Properties for this TypeInfo. -
orderProperties
public void orderProperties()Order the properties based on the XmlAccessOrder, if set. -
isEnumerationType
public boolean isEnumerationType()Indicates if this type info represents an enumeration. Since EnumTypeInfo is used for enum types, this method will always return false.- Returns:
- false
-
isIDSet
public boolean isIDSet()Indicates if an @XmlID is set on a field/property. If so, the TypeProperty 'idProperty' will be non-null. -
getPropertyList
-
getSchemaTypeName
-
setSchemaTypeName
-
setSchema
-
getSchema
-
getPackageLevelAdapterClass
Return the xmladapter class for a given bound type class. -
isAnonymousComplexType
public boolean isAnonymousComplexType() -
getPackageLevelAdapterClass
Return the xmladapter class for a given bound type class name. -
getPackageLevelAdaptersByClass
Return the Map of XmlAdapters for this TypeInfo. -
addPackageLevelAdapterClass
Put a bound type class to adapter class entry in the Map. -
hasRootElement
public boolean hasRootElement() -
hasElementRefs
public boolean hasElementRefs()Indicates if this TypeInfo contains an XmlElementRefs property. -
getElementRefsPropName
Return the XmlElementRefs property name, if one has been set. -
setElementRefsPropertyName
Set the XmlElementRefs property name. -
getObjectFactoryClassName
-
setObjectFactoryClassName
-
getFactoryMethodName
-
setFactoryMethodName
-
getFactoryMethodParamTypes
-
setFactoryMethodParamTypes
-
isSetXmlValueProperty
public boolean isSetXmlValueProperty()Indicates if an xmlValueProperty is set on this TypeInfo, i.e. is non-null. -
getXmlValueProperty
-
setXmlValueProperty
-
isTransient
public boolean isTransient()Indicates if the class represented by this TypeInfo is marked XmlTransient. -
setTransient
public void setTransient(boolean isTransient) Used to indicate that the class represented by this TypeInfo is marked XmlTransient. -
getNonTransientPropertiesInPropOrder
Return all non-transient properties that exist in the propOrder array. -
isSetXmlTransient
public boolean isSetXmlTransient()Indicates if XmlTransient is set. -
setXmlTransient
public void setXmlTransient(boolean isTransient) Set the XmlTransient for this TypeInfo. -
isXmlElementNillable
public boolean isXmlElementNillable()Indicates if XmlElementNillable is set. -
setXmlElementNillable
public void setXmlElementNillable(boolean isXmlElementNillable) Set the XmlElementNillable for this TypeInfo. -
getXmlNullPolicy
Return XmlNullPolicy for this TypeInfo.- Returns:
- xmlNullPolicy
-
setXmlNullPolicy
Set the XmlNullPolicy for this TypeInfo. -
isSetXmlSeeAlso
public boolean isSetXmlSeeAlso()Indicates if xmlSeeAlso has been set, i.e. is non-null- Returns:
- true is xmlSeeAlso has been set, i.e. is non-null, false otherwise
-
getXmlSeeAlso
Return the List of XmlSeeAlso class names for this TypeInfo. -
setXmlSeeAlso
Set the List of XmlSeeAlso class names for this TypeInfo. -
isSetXmlRootElement
public boolean isSetXmlRootElement()Indicates if xmlRootElement has been set, i.e. is non-null- Returns:
- true is xmlRootElement has been set, i.e. is non-null, false otherwise
-
getXmlRootElement
Return the xmlRootElement set on this TypeInfo. -
setXmlRootElement
Set the xmlRootElement for this TypeInfo. -
isSetXmlType
public boolean isSetXmlType()Indicates if xmlType has been set, i.e. is non-null- Returns:
- true is xmlType has been set, i.e. is non-null, false otherwise
-
getXmlType
Return the xmlType set on this TypeInfo. -
setXmlType
Set the xmlType for this TypeInfo. -
isSetXmlAccessType
public boolean isSetXmlAccessType()Indicates if xmlAccessType has been set, i.e. is non-null- Returns:
- true is xmlAccessType has been set, i.e. is non-null, false otherwise
-
getXmlAccessType
Return the xmlAccessType for this TypeInfo. -
setXmlAccessType
Set the xmlAccessType for this TypeInfo. -
isSetXmlAccessOrder
public boolean isSetXmlAccessOrder()Indicates if xmlAccessOrder has been set, i.e. is non-null- Returns:
- true is xmlAccessOrder has been set, i.e. is non-null, false otherwise
-
getXmlAccessOrder
Return the xmlAccessOrder for this TypeInfo. -
setXmlAccessOrder
Set the xmlAccessOrder for this TypeInfo. -
isPreBuilt
public boolean isPreBuilt()Indicates if this TypeInfo has completed the preBuildTypeInfo phase of processing.- Returns:
- true if this TypeInfo has completed the preBuildTypeInfo phase of processing, false otherwise
-
setPreBuilt
public void setPreBuilt(boolean isPreBuilt) Set indicator that this TypeInfo has completed the preBuildTypeInfo phase of processing. -
isPostBuilt
public boolean isPostBuilt()Indicates if this TypeInfo has completed the postBuildTypeInfo phase of processing.- Returns:
- true if this TypeInfo has completed the postBuildTypeInfo phase of processing, false otherwise
-
setPostBuilt
public void setPostBuilt(boolean isPostBuilt) Set indicator that this TypeInfo has completed the postBuildTypeInfo phase of processing. -
isSetXmlJavaTypeAdapter
public boolean isSetXmlJavaTypeAdapter()Indicates if an XmlJavaTypeAdapter has been set, i.e. the xmlJavaTypeAdapter property is non-null.- Returns:
- true if xmlJavaTypeAdapter is non-null, false otherwise
- See Also:
-
getXmlJavaTypeAdapter
Return the xmlJavaTypeAdapter set on this Type.- Returns:
- xmlJavaTypeAdapter, or null if not set
- See Also:
-
setXmlJavaTypeAdapter
Set an XmlJavaTypeAdapter on this Type.- See Also:
-
getXmlCustomizer
Return the XmlCustomizer class name set on this TypeInfo, or null if none is set.- Returns:
- the XmlCustomizer class name set on this TypeInfo, or null if none is set
- See Also:
-
setXmlCustomizer
Sets the XmlCustomizer class name on this TypeInfo.- See Also:
-
isSetAnyElementPropertyName
public boolean isSetAnyElementPropertyName()Indicates if the name of the XmlAnyElement property has been set. -
getAnyElementPropertyName
Return the name of the XmlAnyElement property, if one is set. -
setAnyElementPropertyName
Set the name of the XmlAnyElement property -
isSetAnyAttributePropertyName
public boolean isSetAnyAttributePropertyName()Indicates if the name of the XmlAnyAttribute property has been set. -
getAnyAttributePropertyName
Return the name of the XmlAnyAttribute property, if one is set. -
setAnyAttributePropertyName
Set the name of the XmlAnyAttribute property -
isBinaryDataToBeInlined
public boolean isBinaryDataToBeInlined()Indicates if all binary data types are to be inlined for this class. -
setInlineBinaryData
public void setInlineBinaryData(boolean isBinaryDataInlined) Sets the flag that indicates if all binary data types are to be inlined for this class. -
isSetClassExtractorName
public boolean isSetClassExtractorName()Indicates if a ClassExtractor class name is set, i.e. is non-null- Returns:
- true if classExtractorName != null, otherwise false
-
getClassExtractorName
Return the ClassExtractor class name.- Returns:
- classExtractorName
-
setClassExtractorName
Set the ClassExtractor class name. -
getUserProperties
Return the Map of user-defined properties. -
setUserProperties
Set the Map of user-defined properties. -
getJavaClassName
Return the JavaClass name for this typeinfo. -
setJavaClassName
Set the JavaClass name for this typeinfo. -
getXmlDiscriminatorNode
Return the class indicator field name for this type info. -
setXmlDiscriminatorNode
Sets the class indicator field name (for use with inheritance). -
isSetXmlDiscriminatorNode
public boolean isSetXmlDiscriminatorNode()Indicates if the class indicator field name is set, i.e. is non-null- Returns:
- true if xmlDiscriminatorNode != null, otherwise false
-
getXmlDiscriminatorValue
Return the value of the class indicator field for the java-type associated with this type info. -
setXmlDiscriminatorValue
Set the value of the class indicator field for the java-type associated with this type info. -
isSetXmlDiscriminatorValue
public boolean isSetXmlDiscriminatorValue()Indicates if a class indicator field value has been set, i.e. is non-null- Returns:
- true if xmlDiscriminatorValue != null, otherwise false
-
addXmlKeyProperty
Add an XmlKey property to the list. Each entry will be set as a primary key on the owning descriptor. -
getXmlKeyProperties
Return the list of XmlKey property entries. Each entry will be set as a primary key on the owning descriptor. -
hasXmlKeyProperties
public boolean hasXmlKeyProperties()Indicates if the list of XmlKey property entries has been set, i.e. is non-null. -
getAdditionalProperties
Return a Map of property names to list of properties. This Map will contain entries when one or more properties exist for a given field, as in the case of multiple mappings for a single field. -
getOriginalProperties
Return the list of original properties for this type info. These properties were created during annotations processing, and have not been modified since. -
getXmlVirtualAccessMethods
-
setXmlVirtualAccessMethods
-
getXmlNameTransformer
Return the XMLNameTransformer used when converting Java names to XML names -
setXmlNameTransformer
Set the XMLNameTransformer used when converting Java names to XML names -
getPredicateProperties
INTERNAL: Return the list of predicate properties. Lazy initializes the list. -
hasPredicateProperty
INTERNAL: Return true if the property handed in is a duplicate of any existing predicate property. -
hasPredicateProperties
public boolean hasPredicateProperties()INTERNAL: Return true if the list of predicate properties hasn't been initialized. -
isLocationAware
public boolean isLocationAware() -
setLocationAware
public void setLocationAware(boolean value) -
getXmlAccessorFactory
-
setXmlAccessorFactory
-
getPackageLevelXmlAccessorFactory
-
setPackageLevelXmlAccessorFactory
public void setPackageLevelXmlAccessorFactory(AccessorFactoryWrapper packageLevelXmlAccessorFactory) -
getObjectGraphs
-
getJavaClass
-
setJavaClass
-