Package gnu.kawa.xml

Class ElementType

    • Field Detail

      • MATCH_ANY_LOCALNAME

        public static final java.lang.String MATCH_ANY_LOCALNAME
        See Also:
        Constant Field Values
      • MATCH_ANY_QNAME

        public static final Symbol MATCH_ANY_QNAME
      • anyElement

        public static final ElementType anyElement
      • typeElementType

        public static final ClassType typeElementType
    • Constructor Detail

      • ElementType

        public ElementType​(Symbol qname)
      • ElementType

        public ElementType​(java.lang.String name,
                           Symbol qname)
    • Method Detail

      • make

        public static ElementType make​(java.lang.String namespaceURI,
                                       java.lang.String localName)
        An element type for match by name.
        Parameters:
        localName - if null matches any local name; otherwise must be intered, and matches by identity.
        namespaceURI - full name of namespace, or null for any namespace.
      • getImplementationType

        public Type getImplementationType()
        Description copied from class: Type
        Return Java-level implementation type. The type used to implement types not natively understood by the JVM or the Java language. Usually, the identity function. However, a language might handle union types or template types or type expressions calculated at run time. In that case return the type used at the Java level, and known at compile time.
        Specified by:
        getImplementationType in interface TypeValue
        Overrides:
        getImplementationType in class NodeType
      • getNamespaceURI

        public final java.lang.String getNamespaceURI()
      • getLocalName

        public final java.lang.String getLocalName()
      • coerceFromObject

        public java.lang.Object coerceFromObject​(java.lang.Object obj)
        Description copied from class: Type
        Convert an object to a value of this Type. The result is actually of the implementation type, boxed as appropriate, so it is suitable for standard reflective operations, like the arguments to Field#set or Method#invoke. Throw a ClassCastException when this is not possible.
        Overrides:
        coerceFromObject in class NodeType
      • isInstance

        public boolean isInstance​(java.lang.Object obj)
        Overrides:
        isInstance in class NodeType
      • coerceOrNull

        public static KElement coerceOrNull​(java.lang.Object obj,
                                            java.lang.String namespaceURI,
                                            java.lang.String localName)
      • coerce

        public static KElement coerce​(java.lang.Object obj,
                                      java.lang.String namespaceURI,
                                      java.lang.String localName)
      • setNamespaceNodes

        public void setNamespaceNodes​(NamespaceBinding bindings)
      • getConstructor

        public Procedure getConstructor()
        Description copied from interface: TypeValue
        Get the constructor function for this type. Returns null if there is no contructor function. Also returns null if this extends ClassType or ArrayType and standard Java constructors (<init> methods) should be used.
        Specified by:
        getConstructor in interface TypeValue
        Overrides:
        getConstructor in class NodeType
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class NodeType
        Throws:
        java.io.IOException
      • readExternal

        public void readExternal​(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class NodeType
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class NodeType