org.apache.xalan.xsltc.compiler.util
Class ResultTreeType

java.lang.Object
  |
  +--org.apache.xalan.xsltc.compiler.util.Type
        |
        +--org.apache.xalan.xsltc.compiler.util.ResultTreeType

public final class ResultTreeType
extends Type


Fields inherited from class org.apache.xalan.xsltc.compiler.util.Type
Attribute, Boolean, Comment, Element, Int, Node, NodeSet, Processing_Instruction, Real, Reference, ResultTree, Root, String, Text, Void
 
Constructor Summary
ResultTreeType(java.lang.String methodName)
           
 
Method Summary
 java.lang.String getMethodName()
           
 boolean identicalTo(Type other)
           
 boolean implementedAsMethod()
           
 org.apache.xalan.xsltc.compiler.util.Instruction LOAD(int slot)
           
 org.apache.xalan.xsltc.compiler.util.Instruction STORE(int slot)
           
 de.fub.bytecode.generic.Type toJCType()
           
 java.lang.String toSignature()
           
 java.lang.String toString()
           
 void translateBox(ClassGenerator classGen, MethodGenerator methodGen)
          Translates an object of this type to its boxed representation.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
          Expects an result tree on the stack and pushes a boolean.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, java.lang.Class clazz)
          Translates a result tree to a Java type denoted by clazz.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeSetType type)
          Expects a result tree on the stack and pushes a node-set (iterator).
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
          Expects an result tree on the stack and pushes a real.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
          Expects a result tree on the stack and pushes a boxed result tree.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
          Expects an result tree on the stack and pushes a string.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
          Translates a result tree to object of internal type type.
 FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
          Translates a result tree into a non-synthesized boolean.
 void translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)
          Translates an object of this type to its unboxed representation.
 
Methods inherited from class org.apache.xalan.xsltc.compiler.util.Type
ADD, CMP, distanceTo, DIV, DUP, GE, GT, isNumber, isSimple, LE, LT, MUL, NEG, POP, REM, SUB, translateFrom, translateToDesynthesized
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultTreeType

public ResultTreeType(java.lang.String methodName)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class Type

identicalTo

public boolean identicalTo(Type other)
Overrides:
identicalTo in class Type

toSignature

public java.lang.String toSignature()
Overrides:
toSignature in class Type

toJCType

public de.fub.bytecode.generic.Type toJCType()
Overrides:
toJCType in class Type

getMethodName

public java.lang.String getMethodName()

implementedAsMethod

public boolean implementedAsMethod()
Overrides:
implementedAsMethod in class Type

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.
Overrides:
translateTo in class Type
See Also:
Type.translateTo(org.apache.xalan.xsltc.compiler.util.ClassGenerator, org.apache.xalan.xsltc.compiler.util.MethodGenerator, org.apache.xalan.xsltc.compiler.util.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.
See Also:
Type.translateTo(org.apache.xalan.xsltc.compiler.util.ClassGenerator, org.apache.xalan.xsltc.compiler.util.MethodGenerator, org.apache.xalan.xsltc.compiler.util.Type)

translateTo

public void translateTo(ClassGenerator classGen,
                        MethodGenerator methodGen,
                        StringType type)
Expects an result tree on the stack and pushes a string.
See Also:
Type.translateTo(org.apache.xalan.xsltc.compiler.util.ClassGenerator, org.apache.xalan.xsltc.compiler.util.MethodGenerator, org.apache.xalan.xsltc.compiler.util.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.
See Also:
Type.translateTo(org.apache.xalan.xsltc.compiler.util.ClassGenerator, org.apache.xalan.xsltc.compiler.util.MethodGenerator, org.apache.xalan.xsltc.compiler.util.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.
See Also:
Type.translateTo(org.apache.xalan.xsltc.compiler.util.ClassGenerator, org.apache.xalan.xsltc.compiler.util.MethodGenerator, org.apache.xalan.xsltc.compiler.util.Type)

translateTo

public void translateTo(ClassGenerator classGen,
                        MethodGenerator methodGen,
                        NodeSetType type)
Expects a result tree on the stack and pushes a node-set (iterator).
See Also:
Type.translateTo(org.apache.xalan.xsltc.compiler.util.ClassGenerator, org.apache.xalan.xsltc.compiler.util.MethodGenerator, org.apache.xalan.xsltc.compiler.util.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.
Overrides:
translateToDesynthesized in class Type
See Also:
Type.translateToDesynthesized(org.apache.xalan.xsltc.compiler.util.ClassGenerator, org.apache.xalan.xsltc.compiler.util.MethodGenerator, org.apache.xalan.xsltc.compiler.util.Type)

translateTo

public void translateTo(ClassGenerator classGen,
                        MethodGenerator methodGen,
                        java.lang.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.
Overrides:
translateTo in class Type

translateBox

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

translateUnBox

public void translateUnBox(ClassGenerator classGen,
                           MethodGenerator methodGen)
Translates an object of this type to its unboxed representation.
Overrides:
translateUnBox in class Type

LOAD

public org.apache.xalan.xsltc.compiler.util.Instruction LOAD(int slot)
Overrides:
LOAD in class Type

STORE

public org.apache.xalan.xsltc.compiler.util.Instruction STORE(int slot)
Overrides:
STORE in class Type


Copyright © 2000 Apache XML Project. All Rights Reserved.