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:
Author:
mmacivor
  • Constructor Details

  • Method Details

    • 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 class TypeInfo
      Returns:
      false
    • getClassName

      public String getClassName()
    • setClassName

      public void setClassName(String className)
    • getRestrictionBase

      public QName getRestrictionBase()
    • setRestrictionBase

      public void setRestrictionBase(QName restrictionBase)
    • addJavaFieldToXmlEnumValuePair

      public void addJavaFieldToXmlEnumValuePair(String fieldName, Object xmlEnumValue)
      Add a Java field name to XmlEnumValue pair.
      Parameters:
      fieldName -
      xmlEnumValue -
    • addJavaFieldToXmlEnumValuePair

      public void addJavaFieldToXmlEnumValuePair(boolean override, String fieldName, 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 List<String> getFieldNames()
    • getXmlEnumValues

      public List<Object> getXmlEnumValues()