Class EnumerationAttribute<V extends java.lang.Enum<V> & EnumerationValue>

    • Method Detail

      • checkValue

        protected void checkValue​(@Opt
                                  V value)
        Description copied from class: TypedAttribute
        Check routine for the validity of the attributes' intended value. Is a call-back, implemented by the sub-classes. Is called only here, by two constructors and the #set_value(V) method. The value null means "absent" for #IMPLIED attributes and passes the test.
        Specified by:
        checkValue in class TypedAttribute<V extends java.lang.Enum<V> & EnumerationValue>
        Parameters:
        value - the value to test; maybe null.
      • getValueClass

        protected abstract java.lang.Class<V> getValueClass()
        Will be overridden in the generated code by a method which returns the dedicated value class.
        Returns:
        the Class object for the values of this attribute.
      • getValueMap

        protected abstract java.util.Map<java.lang.String,​? extends V> getValueMap()
        Returns a map from the external representations as appearing in the DTD to the enumeration items of the value's type. Will be overridden by the generated code.
      • getStringValue

        public final java.lang.String getStringValue​(V v)
        Description copied from class: TypedAttribute
        Returns the textual representation of a possible attribute value (not null), as it would be contained literally in a possible XML text representation. Since the textual representation of a String is the string itself, this method is relevant for enumeration types only (Later: also for "entity" types, but these are not yet supported.)
        Specified by:
        getStringValue in class TypedAttribute<V extends java.lang.Enum<V> & EnumerationValue>
        Returns:
        (never null) the textual representation of this attribute value, as it would be contained literally in a possible XML text representation.