Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler.util

public final Class ResultTreeType

extends Type
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.ALOAD, .ASTORE, .CHECKCAST, .ConstantPoolGen, .GETFIELD, .IFEQ, .INVOKEINTERFACE, .INVOKESPECIAL, .INVOKEVIRTUAL, .Instruction, .InstructionList, .LocalVariableGen, .NEW, .PUSH, com.sun.org.apache.xalan.internal.xsltc.compiler.Constants, .FlowList

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private final String
Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type:
AttributeBooleanCommentElementIntNodeNodeSetObjectObjectStringProcessing_InstructionRealReferenceResultTreeRootStringTextVoid

Constructor Summary

AccessConstructor and Description
protected
public
ResultTreeType(String methodName)

Method Summary

Modifier and TypeMethod and Description
public String
getClassName()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.getClassName.

Returns the class name of an internal type's external representation.
public String
public boolean
identicalTo(Type other)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.identicalTo.

Returns true if this and other are identical types.
public boolean
implementedAsMethod()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.implementedAsMethod.

Returns true if this type has no object representaion.
public Instruction
public Instruction
public Type
public String
toSignature()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toSignature.

Returns the signature of an internal type's external representation.
public String
toString()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toString.

Returns a string representation of this type.
public void
translateBox(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateBox.

Translates an object of this type to its boxed representation.
public void
translateTo(ClassGenerator
A BCEL class generator
classGen
,
MethodGenerator
A BCEL method generator
methodGen
,
Type
An instance of the type to translate the result tree to
type
)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateTo.

Translates a result tree to object of internal type type.
public void
translateTo(ClassGenerator
A BCEL class generator
classGen
,
MethodGenerator
A BCEL method generator
methodGen
,
BooleanType
An instance of BooleanType (any)
type
)

Expects an result tree on the stack and pushes a boolean.

public void
translateTo(ClassGenerator
A BCEL class generator
classGen
,
MethodGenerator
A BCEL method generator
methodGen
,
StringType
An instance of StringType (any)
type
)

Expects an result tree on the stack and pushes a string.

public void
translateTo(ClassGenerator
A BCEL class generator
classGen
,
MethodGenerator
A BCEL method generator
methodGen
,
RealType
An instance of RealType (any)
type
)

Expects an result tree on the stack and pushes a real.

public void
translateTo(ClassGenerator
A BCEL class generator
classGen
,
MethodGenerator
A BCEL method generator
methodGen
,
ReferenceType
An instance of ReferenceType (any)
type
)

Expects a result tree on the stack and pushes a boxed result tree.

public void
translateTo(ClassGenerator
A BCEL class generator
classGen
,
MethodGenerator
A BCEL method generator
methodGen
,
NodeSetType
An instance of NodeSetType (any)
type
)

Expects a result tree on the stack and pushes a node-set (iterator).

public void
translateTo(ClassGenerator classGen, MethodGenerator methodGen, ObjectType type)

Subsume result tree into ObjectType.

public void
translateTo(ClassGenerator
A BCEL class generator
classGen
,
MethodGenerator
A BCEL method generator
methodGen
,
Class<?>
An reference to the Class to translate to
clazz
)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateTo.

Translates a result tree to a Java type denoted by clazz.
public FlowList
translateToDesynthesized(ClassGenerator
A BCEL class generator
classGen
,
MethodGenerator
A BCEL method generator
methodGen
,
BooleanType
An instance of BooleanType (any)
type
)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateToDesynthesized.

Translates a result tree into a non-synthesized boolean.
public void
translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateUnBox.

Translates an object of this type to its unboxed representation.
Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type:
ADDCMPdistanceToDIVDUPGEGTisNumberisSimpleLELTMULNEGnewObjectTypenewObjectTypePOPREMSUBtranslateFromtranslateToDesynthesized

Field Detail

_methodNameback to summary
private final String _methodName

Constructor Detail

ResultTreeTypeback to summary
protected ResultTreeType()
ResultTreeTypeback to summary
public ResultTreeType(String methodName)

Method Detail

getClassNameback to summary
public String getClassName()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.getClassName.

Returns the class name of an internal type's external representation.

getMethodNameback to summary
public String getMethodName()
identicalToback to summary
public boolean identicalTo(Type other)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.identicalTo.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.identicalTo.

Returns true if this and other are identical types.

implementedAsMethodback to summary
public boolean implementedAsMethod()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.implementedAsMethod.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.implementedAsMethod.

Returns true if this type has no object representaion. Redefined in ResultTreeType.

LOADback to summary
public Instruction LOAD(int slot)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.LOAD.

STOREback to summary
public Instruction STORE(int slot)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.STORE.

toJCTypeback to summary
public Type toJCType()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toJCType.

toSignatureback to summary
public String toSignature()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toSignature.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toSignature.

Returns the signature of an internal type's external representation.

toStringback to summary
public String toString()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toString.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toString.

Returns a string representation of this type.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

translateBoxback to summary
public void translateBox(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateBox.

Translates an object of this type to its boxed representation.

translateToback to summary
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateTo.

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:ClassGenerator

A BCEL class generator

methodGen:MethodGenerator

A BCEL method generator

type:Type

An instance of the type to translate the result tree to

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
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:ClassGenerator

A BCEL class generator

methodGen:MethodGenerator

A BCEL method generator

type:BooleanType

An instance of BooleanType (any)

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)

Expects an result tree on the stack and pushes a string.

Parameters
classGen:ClassGenerator

A BCEL class generator

methodGen:MethodGenerator

A BCEL method generator

type:StringType

An instance of StringType (any)

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
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:ClassGenerator

A BCEL class generator

methodGen:MethodGenerator

A BCEL method generator

type:RealType

An instance of RealType (any)

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
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:ClassGenerator

A BCEL class generator

methodGen:MethodGenerator

A BCEL method generator

type:ReferenceType

An instance of ReferenceType (any)

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
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 <xsl:apply-templates> and <xsl:for-each> without the DOM parameter/variable being updates as well.

Parameters
classGen:ClassGenerator

A BCEL class generator

methodGen:MethodGenerator

A BCEL method generator

type:NodeSetType

An instance of NodeSetType (any)

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ObjectType type)

Subsume result tree into ObjectType.

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Class<?> clazz)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateTo.

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:ClassGenerator

A BCEL class generator

methodGen:MethodGenerator

A BCEL method generator

clazz:Class<?>

An reference to the Class to translate to

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToDesynthesizedback to summary
public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateToDesynthesized.

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:ClassGenerator

A BCEL class generator

methodGen:MethodGenerator

A BCEL method generator

type:BooleanType

An instance of BooleanType (any)

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateToDesynthesized
translateUnBoxback to summary
public void translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateUnBox.

Translates an object of this type to its unboxed representation.