org.apache.xalan.xsltc.compiler.util

Class NodeSetType

public final class NodeSetType extends Type

Author: Jacek Ambroziak Santiago Pericas-Geertsen

Method Summary
StringgetClassName()
Returns the class name of an internal type's external representation.
booleanidenticalTo(Type other)
InstructionLOAD(int slot)
InstructionSTORE(int slot)
TypetoJCType()
StringtoSignature()
StringtoString()
voidtranslateBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its boxed representation.
voidtranslateFrom(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates an external Java Class into an internal type.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
Translates a node-set into an object of internal type type.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a node-set into a synthesized boolean.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
Translates a node-set into a string.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
Expects a node-set on the stack and pushes a real.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeType type)
Expects a node-set on the stack and pushes a node.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ObjectType type)
Subsume node-set into ObjectType.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a node-set on the stack and pushes a boxed node-set.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a node-set into the Java type denoted by clazz.
FlowListtranslateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a node-set into a non-synthesized boolean.
voidtranslateUnBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its unboxed representation.

Method Detail

getClassName

public String getClassName()
Returns the class name of an internal type's external representation.

identicalTo

public boolean identicalTo(Type other)

LOAD

public Instruction LOAD(int slot)

STORE

public Instruction STORE(int slot)

toJCType

public Type toJCType()

toSignature

public String toSignature()

toString

public String toString()

translateBox

public void translateBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its boxed representation.

translateFrom

public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates an external Java Class into an internal type. Expects the Java object on the stack, pushes the internal type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
Translates a node-set into an object of internal type type. The translation to int is undefined since node-sets are always converted to reals in arithmetic expressions.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a node-set into a synthesized boolean. The boolean value of a node-set is "true" if non-empty and "false" otherwise. Notice that the function getFirstNode() is called in translateToDesynthesized().

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
Translates a node-set into a string. The string value of a node-set is value of its first element.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
Expects a node-set on the stack and pushes a real. First the node-set is converted to string, and from string to real.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeType type)
Expects a node-set on the stack and pushes a node.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ObjectType type)
Subsume node-set into ObjectType.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a node-set on the stack and pushes a boxed node-set. Node sets are already boxed so the translation is just a NOP.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a node-set into the Java type denoted by clazz. Expects a node-set on the stack and pushes an object of the appropriate type after coercion.

translateToDesynthesized

public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a node-set into a non-synthesized boolean. It does not push a 0 or a 1 but instead returns branchhandle list to be appended to the false list.

See Also: Type

translateUnBox

public void translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its unboxed representation.
Copyright B) 2005 Apache XML Project. All Rights Reserved.