Class RuntimeBuiltinLeafInfoImpl<T>

    • Method Detail

      • getClazz

        public final java.lang.Class getClazz()
        Description copied from interface: RuntimeLeafInfo
        The same as TypeInfo.getType() but returns the type as a Class.

        Note that the returned Class object does not necessarily represents a class declaration. It can be primitive types.

        Specified by:
        getClazz in interface RuntimeLeafInfo
      • getTypeName

        public javax.xml.namespace.QName getTypeName​(T instance)
        Description copied from interface: Transducer
        Transducers implicitly work against a single XML type, but sometimes (most notably XMLGregorianCalendar, an instance may choose different XML types.
        Specified by:
        getTypeName in interface Transducer<T>
        Returns:
        return non-null from this method allows transducers to specify the type it wants to marshal to. Most of the time this method returns null, in which case the implicitly associated type will be used.
      • getType

        public TypeT getType()
        A reference to the representation of the type.
        Specified by:
        getType in interface TypeInfo<TypeT,​ClassDeclT>
        Returns:
        always non-null.
      • canBeReferencedByIDREF

        public final boolean canBeReferencedByIDREF()
        Deprecated.
        why are you calling a method whose return value is always known?
        Leaf-type cannot be referenced from IDREF.
        Specified by:
        canBeReferencedByIDREF in interface TypeInfo<TypeT,​ClassDeclT>
      • getTypeName

        public javax.xml.namespace.QName getTypeName()
        Description copied from interface: NonElement
        Gets the primary XML type ANYTYPE_NAME of the class.

        A Java type can be mapped to multiple XML types, but one of them is considered "primary" and used when we generate a schema.

        Specified by:
        getTypeName in interface NonElement<TypeT,​ClassDeclT>
        Returns:
        null if the object doesn't have an explicit type ANYTYPE_NAME (AKA anonymous.)
      • getLocation

        public Location getLocation()
        Description copied from interface: Locatable
        Gets the location object that this object points to. This operation could be inefficient and costly.
        Specified by:
        getLocation in interface Locatable
      • isSimpleType

        public boolean isSimpleType()
        Description copied from interface: NonElement
        Returns true if this NonElement maps to text in XML, without any attribute nor child elements.
        Specified by:
        isSimpleType in interface NonElement<TypeT,​ClassDeclT>
      • toString

        public java.lang.String toString()
        Description copied from interface: Location
        Returns a human-readable string that represents this position.
        Specified by:
        toString in interface Location
        Overrides:
        toString in class java.lang.Object
        Returns:
        never null.