public class AttributeType extends NodeType implements TypeValue, java.io.Externalizable, AttributePredicate
Type.NeverReturns
Modifier and Type | Field and Description |
---|---|
static ClassType |
typeAttributeType |
anyNodeTest, ATTRIBUTE_OK, COMMENT_OK, commentNodeTest, DOCUMENT_OK, documentNodeTest, ELEMENT_OK, nodeType, PI_OK, TEXT_OK, textNodeTest, typeKNode, typeNodeType
flags
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 and Description |
---|
AttributeType(java.lang.String name,
Symbol qname) |
AttributeType(Symbol qname) |
Modifier and Type | Method and Description |
---|---|
static SeqPosition |
coerce(java.lang.Object obj,
java.lang.String namespaceURI,
java.lang.String localName) |
java.lang.Object |
coerceFromObject(java.lang.Object obj)
Convert an object to a value of this Type.
|
static KAttr |
coerceOrNull(java.lang.Object obj,
java.lang.String namespaceURI,
java.lang.String localName) |
void |
emitCoerceFromObject(CodeAttr code)
Compile (in given method) cast from Object to this Type.
|
protected void |
emitCoerceOrNullMethod(Variable incoming,
Compilation comp) |
Type |
getImplementationType()
Return Java-level implementation type.
|
java.lang.String |
getLocalName() |
java.lang.String |
getNamespaceURI() |
boolean |
isInstance(AbstractSequence seq,
int ipos,
java.lang.Object attrType) |
boolean |
isInstance(java.lang.Object obj) |
boolean |
isInstancePos(AbstractSequence seq,
int ipos) |
static AttributeType |
make(java.lang.String namespaceURI,
java.lang.String localName) |
static AttributeType |
make(Symbol qname) |
void |
readExternal(java.io.ObjectInput in) |
java.lang.String |
toString() |
void |
writeExternal(java.io.ObjectOutput out) |
coerceForce, coerceOrNull, compare, convertValue, emitIsInstance, emitTestIf, getConstructor, isInstance
getContextClass, getContextClassLoader, getField, getInterfaces, getInternalName, getMethod, getMethods, getMethods, getReflectClass, getSuperclass, isExisting, setExisting
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
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
convertValue, emitIsInstance, emitTestIf, encodeType, getConstructor
public static final ClassType typeAttributeType
public AttributeType(Symbol qname)
public AttributeType(java.lang.String name, Symbol qname)
public static AttributeType make(java.lang.String namespaceURI, java.lang.String localName)
public static AttributeType make(Symbol qname)
public Type getImplementationType()
Type
getImplementationType
in interface TypeValue
getImplementationType
in class NodeType
public final java.lang.String getNamespaceURI()
public final java.lang.String getLocalName()
public void emitCoerceFromObject(CodeAttr code)
ObjectType
emitCoerceFromObject
in class NodeType
public java.lang.Object coerceFromObject(java.lang.Object obj)
Type
coerceFromObject
in class NodeType
public boolean isInstancePos(AbstractSequence seq, int ipos)
isInstancePos
in interface ItemPredicate
isInstancePos
in class NodeType
public boolean isInstance(AbstractSequence seq, int ipos, java.lang.Object attrType)
isInstance
in interface AttributePredicate
public boolean isInstance(java.lang.Object obj)
isInstance
in class NodeType
public static KAttr coerceOrNull(java.lang.Object obj, java.lang.String namespaceURI, java.lang.String localName)
public static SeqPosition coerce(java.lang.Object obj, java.lang.String namespaceURI, java.lang.String localName)
protected void emitCoerceOrNullMethod(Variable incoming, Compilation comp)
emitCoerceOrNullMethod
in class NodeType
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class NodeType
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class NodeType
java.io.IOException
java.lang.ClassNotFoundException