gnu.kawa.xml

Class NodeType

public class NodeType extends ObjectType implements TypeValue, NodePredicate, Externalizable

A SeqPosition used to represent a node in (usually) a TreeList. This is special in that the represented node is the current position of the SeqPosition - but when passed to a method it is only valid during that method. After the method returns, the caller is free to change the position, so if the node is saved in a data structure it must be copied.
Field Summary
static intATTRIBUTE_OK
static NodeTypeanyNodeTest
static NodeTypecommentNodeTest
static intCOMMENT_OK
static NodeTypedocumentNodeTest
static intDOCUMENT_OK
static intELEMENT_OK
static NodeTypenodeType
static intPI_OK
static NodeTypetextNodeTest
static ClassTypetypeKNode
static ClassTypetypeNodeType
static intTEXT_OK
Constructor Summary
NodeType(String name, int kinds)
NodeType(String name)
Method Summary
static KNodecoerceForce(Object obj, int kinds)
ObjectcoerceFromObject(Object obj)
static KNodecoerceOrNull(Object obj, int kinds)
intcompare(Type other)
voidemitCoerceFromObject(CodeAttr code)
protected voidemitCoerceOrNullMethod(Variable incoming, Compilation comp)
voidemitIsInstance(Variable incoming, Compilation comp, Target target)
voidemitTestIf(Variable incoming, Declaration decl, Compilation comp)
ProceduregetConstructor()
TypegetImplementationType()
booleanisInstance(Object obj)
static booleanisInstance(AbstractSequence seq, int ipos, int kinds)
booleanisInstancePos(AbstractSequence seq, int ipos)
voidreadExternal(ObjectInput in)
StringtoString()
voidwriteExternal(ObjectOutput out)

Field Detail

ATTRIBUTE_OK

public static final int ATTRIBUTE_OK

anyNodeTest

public static final NodeType anyNodeTest

commentNodeTest

public static final NodeType commentNodeTest

COMMENT_OK

public static final int COMMENT_OK

documentNodeTest

public static final NodeType documentNodeTest

DOCUMENT_OK

public static final int DOCUMENT_OK

ELEMENT_OK

public static final int ELEMENT_OK

nodeType

public static final NodeType nodeType

PI_OK

public static final int PI_OK

textNodeTest

public static final NodeType textNodeTest

typeKNode

public static final ClassType typeKNode

typeNodeType

public static final ClassType typeNodeType

TEXT_OK

public static final int TEXT_OK

Constructor Detail

NodeType

public NodeType(String name, int kinds)

NodeType

public NodeType(String name)

Method Detail

coerceForce

public static KNode coerceForce(Object obj, int kinds)

coerceFromObject

public Object coerceFromObject(Object obj)

coerceOrNull

public static KNode coerceOrNull(Object obj, int kinds)

compare

public int compare(Type other)

emitCoerceFromObject

public void emitCoerceFromObject(CodeAttr code)

emitCoerceOrNullMethod

protected void emitCoerceOrNullMethod(Variable incoming, Compilation comp)

emitIsInstance

public void emitIsInstance(Variable incoming, Compilation comp, Target target)

emitTestIf

public void emitTestIf(Variable incoming, Declaration decl, Compilation comp)

getConstructor

public Procedure getConstructor()

getImplementationType

public Type getImplementationType()

isInstance

public boolean isInstance(Object obj)

isInstance

public static boolean isInstance(AbstractSequence seq, int ipos, int kinds)

isInstancePos

public boolean isInstancePos(AbstractSequence seq, int ipos)

readExternal

public void readExternal(ObjectInput in)

toString

public String toString()

writeExternal

public void writeExternal(ObjectOutput out)