Package 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
,Externalizable
,Serializable
,Type
public class AttributeType
extends NodeType
implements TypeValue, Externalizable, AttributePredicate
Matches an attribute name pattern.
FIXME: ElementType and AttributeType should both inherit
from a common NamedNodeType class.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gnu.bytecode.Type
Type.NeverReturns
-
Field Summary
FieldsFields 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.ObjectType
flags
Fields inherited from class gnu.bytecode.Type
boolean_ctype, boolean_type, booleanType, booleanValue_method, byte_type, byteType, char_type, charType, clone_method, double_type, doubleType, doubleValue_method, errorType, float_type, floatType, floatValue_method, int_type, intType, intValue_method, java_lang_Class_type, javalangannotationAnnotationType, javalangBooleanType, javalangCharacterType, javalangClassType, javalanginvokeMethodHandleType, javalangNumberType, javalangObjectType, javalangStringType, javalangThrowableType, long_type, longType, longValue_method, neverReturnsType, nullType, number_type, objectType, pointer_type, reflectClass, short_type, shortType, string_type, throwable_type, toString_method, tostring_type, toStringType, typeArray0, void_type, voidType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SeqPosition
coerceFromObject
(Object obj) Convert an object to a value of this Type.static KAttr
coerceOrNull
(Object obj, String namespaceURI, String localName) void
emitCoerceFromObject
(CodeAttr code) Compile (in given method) cast from Object to this Type.protected void
emitCoerceOrNullMethod
(Variable incoming, Compilation comp) Return Java-level implementation type.final String
final String
boolean
isInstance
(AbstractSequence seq, int ipos, Object attrType) boolean
isInstance
(Object obj) boolean
isInstancePos
(AbstractSequence seq, int ipos) static AttributeType
static AttributeType
void
toString()
void
Methods inherited from class gnu.kawa.xml.NodeType
coerceForce, coerceOrNull, compare, convertValue, emitIsInstance, emitTestIf, getConstructor, isInstance
Methods inherited from class gnu.bytecode.ObjectType
getContextClass, getContextClassLoader, getField, getInterfaces, getInternalName, getMethod, getMethods, getMethods, getReflectClass, getSuperclass, isExisting, setExisting
Methods inherited from class gnu.bytecode.Type
coerceToObject, emitCoerceToObject, emitConvertFromPrimitive, emitIsInstance, getGenericSignature, getMaybeGenericSignature, getName, getRawType, getRealType, getSignature, getSize, getSizeInWords, getType, hashCode, isCompatibleWithValue, isCompatibleWithValue, isInterface, isMoreSpecific, isSame, isSubtype, isValidJavaTypeName, isVoid, lookupType, lowestCommonSharedType, lowestCommonSuperType, make, make, printSignature, promote, promoteIfUnsigned, registerTypeForClass, setGenericSignature, 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
Methods inherited from interface java.lang.reflect.Type
getTypeName
Methods inherited from interface gnu.expr.TypeValue
convertValue, emitIsInstance, emitTestIf, encodeType, getConstructor
-
Field Details
-
typeAttributeType
-
-
Constructor Details
-
AttributeType
-
AttributeType
-
-
Method Details
-
make
-
make
-
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 interfaceTypeValue
- Overrides:
getImplementationType
in classNodeType
-
getNamespaceURI
-
getLocalName
-
emitCoerceFromObject
Description copied from class:ObjectType
Compile (in given method) cast from Object to this Type.- Overrides:
emitCoerceFromObject
in classNodeType
-
coerceFromObject
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 classNodeType
-
isInstancePos
- Specified by:
isInstancePos
in interfaceItemPredicate
- Overrides:
isInstancePos
in classNodeType
-
isInstance
- Specified by:
isInstance
in interfaceAttributePredicate
-
isInstance
- Overrides:
isInstance
in classNodeType
-
coerceOrNull
-
coerce
-
emitCoerceOrNullMethod
- Overrides:
emitCoerceOrNullMethod
in classNodeType
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classNodeType
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classNodeType
- Throws:
IOException
ClassNotFoundException
-
toString
-