gnu.kawa.xml
Class AttributeType
java.lang.Object
gnu.bytecode.Type
gnu.bytecode.ObjectType
gnu.kawa.xml.NodeType
gnu.kawa.xml.AttributeType
- All Implemented Interfaces:
- TypeValue, AttributePredicate, ItemPredicate, NodePredicate, java.io.Externalizable, java.io.Serializable
public class AttributeType
- extends NodeType
- implements TypeValue, java.io.Externalizable, AttributePredicate
Matches an attribute name pattern.
FIXME: ElementType and AttributeType should both inherit
from a common NamedNodeType class.
- See Also:
- Serialized Form
Fields inherited from class gnu.kawa.xml.NodeType |
anyNodeTest, ATTRIBUTE_OK, COMMENT_OK, commentNodeTest, DOCUMENT_OK, documentNodeTest, ELEMENT_OK, nodeType, PI_OK, TEXT_OK, textNodeTest, typeKNode, typeNodeType |
Fields inherited from class gnu.bytecode.Type |
boolean_ctype, boolean_type, booleanValue_method, byte_type, char_type, clone_method, double_type, doubleValue_method, float_type, floatValue_method, int_type, intValue_method, java_lang_Class_type, long_type, longValue_method, neverReturnsType, nullType, number_type, pointer_type, reflectClass, short_type, string_type, throwable_type, toString_method, tostring_type, typeArray0, void_type |
Methods inherited from class gnu.bytecode.Type |
coerceToObject, emitCoerceToObject, emitIsInstance, getName, getSignature, getSize, getSizeInWords, getType, hashCode, isMoreSpecific, isSubtype, isValidJavaTypeName, isVoid, lookupType, lowestCommonSuperType, make, registerTypeForClass, setName, setReflectClass, setSignature, signatureLength, signatureLength, signatureToName, signatureToPrimitive, signatureToType, signatureToType, swappedCompareResult |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
typeAttributeType
public static final ClassType typeAttributeType
AttributeType
public AttributeType(Symbol qname)
AttributeType
public AttributeType(java.lang.String name,
Symbol qname)
make
public static AttributeType make(java.lang.String namespaceURI,
java.lang.String localName)
make
public static AttributeType make(Symbol qname)
getImplementationType
public Type getImplementationType()
- Description copied from class:
Type
- The type used to implement types not natively understood by the JVM.
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 JVM 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()
emitCoerceFromObject
public void emitCoerceFromObject(CodeAttr code)
- Description copied from class:
ObjectType
- Compile (in given method) cast from Object to this Type.
- Overrides:
emitCoerceFromObject
in class NodeType
coerceFromObject
public java.lang.Object coerceFromObject(java.lang.Object obj)
- Description copied from class:
ObjectType
- Convert an object to a value of this Type.
Throw a ClassCastException when this is not possible.
- Overrides:
coerceFromObject
in class NodeType
isInstancePos
public boolean isInstancePos(AbstractSequence seq,
int ipos)
- Specified by:
isInstancePos
in interface ItemPredicate
- Overrides:
isInstancePos
in class NodeType
isInstance
public boolean isInstance(AbstractSequence seq,
int ipos,
java.lang.Object attrType)
- Specified by:
isInstance
in interface AttributePredicate
isInstance
public boolean isInstance(java.lang.Object obj)
- Overrides:
isInstance
in class NodeType
coerceOrNull
public static SeqPosition coerceOrNull(java.lang.Object obj,
java.lang.String namespaceURI,
java.lang.String localName)
coerce
public static SeqPosition coerce(java.lang.Object obj,
java.lang.String namespaceURI,
java.lang.String localName)
emitCoerceOrNullMethod
protected void emitCoerceOrNullMethod(Variable incoming,
Compilation comp)
- Overrides:
emitCoerceOrNullMethod
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