org.apache.xalan.xsltc.compiler.util

Class ResultTreeType

public final class ResultTreeType extends Type

Author: Jacek Ambroziak Santiago Pericas-Geertsen Morten Jorgensen

Constructor Summary
ResultTreeType(String methodName)
Method Summary
StringgetClassName()
Returns the class name of an internal type's external representation.
StringgetMethodName()
booleanidenticalTo(Type other)
booleanimplementedAsMethod()
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 result tree to object of internal type type.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Expects an result tree on the stack and pushes a boolean.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
Expects an result tree on the stack and pushes a string.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
Expects an result tree on the stack and pushes a real.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a result tree on the stack and pushes a boxed result tree.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeSetType type)
Expects a result tree on the stack and pushes a node-set (iterator).
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ObjectType type)
Subsume result tree into ObjectType.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a result tree to a Java type denoted by clazz.
FlowListtranslateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a result tree into a non-synthesized boolean.
voidtranslateUnBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its unboxed representation.

Constructor Detail

ResultTreeType

public ResultTreeType(String methodName)

Method Detail

getClassName

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

getMethodName

public String getMethodName()

identicalTo

public boolean identicalTo(Type other)

implementedAsMethod

public boolean implementedAsMethod()

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 result tree to object of internal type type. The translation to int is undefined since result trees are always converted to reals in arithmetic expressions.

Parameters: classGen A BCEL class generator methodGen A BCEL method generator type An instance of the type to translate the result tree to

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Expects an result tree on the stack and pushes a boolean. Translates a result tree to a boolean by first converting it to string.

Parameters: classGen A BCEL class generator methodGen A BCEL method generator type An instance of BooleanType (any)

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
Expects an result tree on the stack and pushes a string.

Parameters: classGen A BCEL class generator methodGen A BCEL method generator type An instance of StringType (any)

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
Expects an result tree on the stack and pushes a real. Translates a result tree into a real by first converting it to string.

Parameters: classGen A BCEL class generator methodGen A BCEL method generator type An instance of RealType (any)

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a result tree on the stack and pushes a boxed result tree. Result trees are already boxed so the translation is just a NOP.

Parameters: classGen A BCEL class generator methodGen A BCEL method generator type An instance of ReferenceType (any)

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeSetType type)
Expects a result tree on the stack and pushes a node-set (iterator). Note that the produced iterator is an iterator for the DOM that contains the result tree, and not the DOM that is currently in use. This conversion here will therefore not directly work with elements such as and without the DOM parameter/variable being updates as well.

Parameters: classGen A BCEL class generator methodGen A BCEL method generator type An instance of NodeSetType (any)

See Also: Type

translateTo

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

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a result tree to a Java type denoted by clazz. Expects a result tree on the stack and pushes an object of the appropriate type after coercion. Result trees are translated to W3C Node or W3C NodeList and the translation is done via node-set type.

Parameters: classGen A BCEL class generator methodGen A BCEL method generator clazz An reference to the Class to translate to

See Also: Type

translateToDesynthesized

public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a result tree 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.

Parameters: classGen A BCEL class generator methodGen A BCEL method generator type An instance of BooleanType (any)

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.