org.apache.xalan.xsltc.compiler.util

Class NodeType

public final class NodeType extends Type

Author: Jacek Ambroziak Santiago Pericas-Geertsen

Method Summary
StringgetClassName()
Returns the class name of an internal type's external representation.
intgetType()
inthashCode()
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.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
Translates a node into an object of internal type type.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
Expects a node on the stack and pushes its string value.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a node into a synthesized boolean.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
Expects a node on the stack and pushes a real.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeSetType type)
Expects a node on the stack and pushes a singleton node-set.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ObjectType type)
Subsume Node into ObjectType.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a node on the stack and pushes a boxed node.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a node into the Java type denoted by clazz.
FlowListtranslateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a node 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.

getType

public int getType()

hashCode

public int hashCode()

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.

translateTo

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

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
Expects a node on the stack and pushes its string value.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a node into a synthesized boolean. If the expression is "@attr", then "true" is pushed iff "attr" is an attribute of the current node. If the expression is ".", the result is always "true".

See Also: Type

translateTo

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

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeSetType type)
Expects a node on the stack and pushes a singleton node-set. Singleton iterators are already started after construction.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ObjectType type)
Subsume Node into ObjectType.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a node on the stack and pushes a boxed node. Boxed nodes are represented by an instance of org.apache.xalan.xsltc.dom.Node.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a node into the Java type denoted by clazz. Expects a node 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 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 © 2005 Apache XML Project. All Rights Reserved.