Class EnumTypeInfo
- java.lang.Object
-
- org.eclipse.persistence.jaxb.compiler.TypeInfo
-
- org.eclipse.persistence.jaxb.compiler.EnumTypeInfo
-
public class EnumTypeInfo extends TypeInfo
INTERNAL:Purpose:A specialized TypeInfo that stores additional information for a Java 5 Enumeration type.
Responsibilities:
- Hold onto the restriction base type for schema generation
- Hold onto a map of Object Enum values to String values for Mapping generation
- See Also:
TypeInfo
,AnnotationsProcessor
- Author:
- mmacivor
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.jaxb.compiler.TypeInfo
DEFAULT_NAME_TRANSFORMER
-
-
Constructor Summary
Constructors Constructor Description EnumTypeInfo(Helper helper, JavaClass javaClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addJavaFieldToXmlEnumValuePair(boolean override, java.lang.String fieldName, java.lang.Object xmlEnumValue)
Add a Java field name to XmlEnumValue pair.void
addJavaFieldToXmlEnumValuePair(java.lang.String fieldName, java.lang.Object xmlEnumValue)
Add a Java field name to XmlEnumValue pair.java.lang.String
getClassName()
java.util.List<java.lang.String>
getFieldNames()
javax.xml.namespace.QName
getRestrictionBase()
java.util.List<java.lang.Object>
getXmlEnumValues()
boolean
isEnumerationType()
Indicates if this type info represents an enumeration.void
setClassName(java.lang.String className)
void
setRestrictionBase(javax.xml.namespace.QName restrictionBase)
-
Methods inherited from class org.eclipse.persistence.jaxb.compiler.TypeInfo
addPackageLevelAdapterClass, addProperty, addXmlKeyProperty, getAdditionalProperties, getAnyAttributePropertyName, getAnyElementPropertyName, getClassExtractorName, getClassNamespace, getComplexType, getCompositor, getDescriptor, getElementRefsPropName, getFactoryMethodName, getFactoryMethodParamTypes, getIDProperty, getJavaClass, getJavaClassName, getNonTransientPropertiesInPropOrder, getObjectFactoryClassName, getObjectGraphs, getOriginalProperties, getPackageLevelAdapterClass, getPackageLevelAdapterClass, getPackageLevelAdaptersByClass, getPackageLevelXmlAccessorFactory, getPredicateProperties, getProperties, getPropertyList, getPropertyNames, getPropOrder, getSchema, getSchemaTypeName, getSimpleType, getUserProperties, getXmlAccessOrder, getXmlAccessorFactory, getXmlAccessType, getXmlCustomizer, getXmlDiscriminatorNode, getXmlDiscriminatorValue, getXmlJavaTypeAdapter, getXmlKeyProperties, getXmlNameTransformer, getXmlNullPolicy, getXmlRootElement, getXmlSeeAlso, getXmlType, getXmlValueProperty, getXmlVirtualAccessMethods, hasElementRefs, hasPredicateProperties, hasPredicateProperty, hasRootElement, hasXmlKeyProperties, isAnonymousComplexType, isBinaryDataToBeInlined, isComplexType, isIDSet, isLocationAware, isMixed, isPostBuilt, isPreBuilt, isSetAnyAttributePropertyName, isSetAnyElementPropertyName, isSetClassExtractorName, isSetPropOrder, isSetXmlAccessOrder, isSetXmlAccessType, isSetXmlDiscriminatorNode, isSetXmlDiscriminatorValue, isSetXmlJavaTypeAdapter, isSetXmlRootElement, isSetXmlSeeAlso, isSetXmlTransient, isSetXmlType, isSetXmlValueProperty, isTransient, isXmlElementNillable, orderProperties, setAnyAttributePropertyName, setAnyElementPropertyName, setClassExtractorName, setClassNamespace, setComplexType, setCompositor, setDescriptor, setElementRefsPropertyName, setFactoryMethodName, setFactoryMethodParamTypes, setIDProperty, setInlineBinaryData, setJavaClass, setJavaClassName, setLocationAware, setMixed, setObjectFactoryClassName, setPackageLevelXmlAccessorFactory, setPostBuilt, setPreBuilt, setProperties, setPropOrder, setSchema, setSchemaTypeName, setSimpleType, setTransient, setUserProperties, setXmlAccessOrder, setXmlAccessorFactory, setXmlAccessType, setXmlCustomizer, setXmlDiscriminatorNode, setXmlDiscriminatorValue, setXmlElementNillable, setXmlJavaTypeAdapter, setXmlNameTransformer, setXmlNullPolicy, setXmlRootElement, setXmlSeeAlso, setXmlTransient, setXmlType, setXmlValueProperty, setXmlVirtualAccessMethods
-
-
-
-
Method Detail
-
isEnumerationType
public boolean isEnumerationType()
Description copied from class:TypeInfo
Indicates if this type info represents an enumeration. Since EnumTypeInfo is used for enum types, this method will always return false.- Overrides:
isEnumerationType
in classTypeInfo
- Returns:
- false
-
getClassName
public java.lang.String getClassName()
-
setClassName
public void setClassName(java.lang.String className)
-
getRestrictionBase
public javax.xml.namespace.QName getRestrictionBase()
-
setRestrictionBase
public void setRestrictionBase(javax.xml.namespace.QName restrictionBase)
-
addJavaFieldToXmlEnumValuePair
public void addJavaFieldToXmlEnumValuePair(java.lang.String fieldName, java.lang.Object xmlEnumValue)
Add a Java field name to XmlEnumValue pair.- Parameters:
fieldName
-xmlEnumValue
-
-
addJavaFieldToXmlEnumValuePair
public void addJavaFieldToXmlEnumValuePair(boolean override, java.lang.String fieldName, java.lang.Object xmlEnumValue)
Add a Java field name to XmlEnumValue pair. If an entry exists at the specified with the same fieldName, its value will be overridden. A value of true for 'override' will typically be used when performing overrides via XML metadata in XmlProcessor.- Parameters:
override
-fieldName
-xmlEnumValue
-
-
getFieldNames
public java.util.List<java.lang.String> getFieldNames()
-
getXmlEnumValues
public java.util.List<java.lang.Object> getXmlEnumValues()
-
-