Package com.adobe.xfa

Class EnumValue

java.lang.Object
com.adobe.xfa.Attribute
com.adobe.xfa.EnumValue

public final class EnumValue extends Attribute
This class represents an XFA attribute whose value is one of an enumerated set. The contents of this class are an attribute name and enumerated value (EnumAttr) combination. This class ensures that there is only one canonical representation of each attribute/value combination.
  • Method Details

    • getAttr

      public EnumAttr getAttr()
      Get the attribute value of the stored enum
      Returns:
      the integer enumerated value
    • getInt

      public int getInt()
      Get the integer value of the stored enum
      Returns:
      the integer enumerated value
    • getType

      public EnumType getType()
      Get the type of the stored enum
      Returns:
      the enumerated type.
    • newAttribute

      public Attribute newAttribute(String value)
      Description copied from class: Attribute
      Create a new attribute, given a new value
      Specified by:
      newAttribute in class Attribute
      Parameters:
      value - the string to use to create the new attribute
      Returns:
      a new attribute
    • newAttribute

      public Attribute newAttribute(String NS, String localName, String qName, String value)
      Description copied from class: Attribute
      Create a new attribute, given all attribute parameters
      Specified by:
      newAttribute in class Attribute
      Parameters:
      NS - the namespace for this attribute
      localName - the local name for this attribute
      qName - the qualified name for this attribute
      value - the string to use to create the new attribute
      Returns:
      a new attribute
    • newAttribute

      public Attribute newAttribute(String NS, String localName, String qName, String value, boolean internSymbols)
      Description copied from class: Attribute
      Create a new attribute, given all attribute parameters
      Specified by:
      newAttribute in class Attribute
      Parameters:
      NS - the namespace for this attribute
      localName - the local name for this attribute
      qName - the qualified name for this attribute
      value - the string to use to create the new attribute
      internSymbols - indicates whether the symbols in other parameters need to be interned.
      Returns:
      a new attribute
    • getAttrTag

      public int getAttrTag()
      get the tag that corresponds to this enum value.
      Returns:
      the attribute tag.
    • getEnum

      public static EnumValue getEnum(int eAttrTag, EnumAttr value)
      get a canonical instance of an attribute, given an attribute tag and value.
      Parameters:
      eAttrTag - - the attribute tag
      value - - the enumerated value
      Returns:
      the canonical attribute
    • getEnum

      public static EnumValue getEnum(int eAttrTag, int value)
      Get a canonical instance of an attribute, given an attribute tag and an enumerated value.
      Parameters:
      eAttrTag - - the attribute tag
      value - - the enumerated value from EnumAttr
      Returns:
      the canonical attribute