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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EnumAttr
getAttr()
Get the attribute value of the stored enumint
getAttrTag()
get the tag that corresponds to this enum value.static EnumValue
getEnum(int eAttrTag, int value)
Get a canonical instance of an attribute, given an attribute tag and an enumerated value.static EnumValue
getEnum(int eAttrTag, EnumAttr value)
get a canonical instance of an attribute, given an attribute tag and value.int
getInt()
Get the integer value of the stored enumEnumType
getType()
Get the type of the stored enumAttribute
newAttribute(java.lang.String value)
Create a new attribute, given a new valueAttribute
newAttribute(java.lang.String NS, java.lang.String localName, java.lang.String qName, java.lang.String value)
Create a new attribute, given all attribute parametersAttribute
newAttribute(java.lang.String NS, java.lang.String localName, java.lang.String qName, java.lang.String value, boolean internSymbols)
Create a new attribute, given all attribute parameters-
Methods inherited from class com.adobe.xfa.Attribute
getAttrValue, getLocalName, getName, getNS, getPrefix, getQName, isEmpty, isNameSpaceAttr, isSchemaAttr, isXSINilAttr, normalize, toString
-
-
-
-
Method Detail
-
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(java.lang.String value)
Description copied from class:Attribute
Create a new attribute, given a new value- Specified by:
newAttribute
in classAttribute
- Parameters:
value
- the string to use to create the new attribute- Returns:
- a new attribute
-
newAttribute
public Attribute newAttribute(java.lang.String NS, java.lang.String localName, java.lang.String qName, java.lang.String value)
Description copied from class:Attribute
Create a new attribute, given all attribute parameters- Specified by:
newAttribute
in classAttribute
- Parameters:
NS
- the namespace for this attributelocalName
- the local name for this attributeqName
- the qualified name for this attributevalue
- the string to use to create the new attribute- Returns:
- a new attribute
-
newAttribute
public Attribute newAttribute(java.lang.String NS, java.lang.String localName, java.lang.String qName, java.lang.String value, boolean internSymbols)
Description copied from class:Attribute
Create a new attribute, given all attribute parameters- Specified by:
newAttribute
in classAttribute
- Parameters:
NS
- the namespace for this attributelocalName
- the local name for this attributeqName
- the qualified name for this attributevalue
- the string to use to create the new attributeinternSymbols
- 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 tagvalue
- - 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 tagvalue
- - the enumerated value from EnumAttr- Returns:
- the canonical attribute
-
-