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

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

public final class IntType
extends NumberType


Fields inherited from class org.apache.xalan.xsltc.compiler.util.Type
Attribute, Boolean, Comment, Element, Int, Node, NodeSet, Object, Processing_Instruction, Real, Reference, ResultTree, Root, String, Text, Void
 
Method Summary
 org.apache.bcel.generic.Instruction ADD()
           
 int distanceTo(Type type)
           
 org.apache.bcel.generic.Instruction DIV()
           
 org.apache.bcel.generic.BranchInstruction GE(boolean tozero)
           
 org.apache.bcel.generic.BranchInstruction GT(boolean tozero)
           
 boolean identicalTo(Type other)
           
 org.apache.bcel.generic.BranchInstruction LE(boolean tozero)
           
 org.apache.bcel.generic.Instruction LOAD(int slot)
           
 org.apache.bcel.generic.BranchInstruction LT(boolean tozero)
           
 org.apache.bcel.generic.Instruction MUL()
           
 org.apache.bcel.generic.Instruction NEG()
           
 org.apache.bcel.generic.Instruction REM()
           
 org.apache.bcel.generic.Instruction STORE(int slot)
           
 org.apache.bcel.generic.Instruction SUB()
           
 org.apache.bcel.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 integer on the stack and pushes a 0 if its value is 0 and a 1 otherwise.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, java.lang.Class clazz)
          Translates an integer into the Java type denoted by clazz.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
          Expects an integer on the stack and pushes a real.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
          Expects an integer on the stack and pushes a boxed integer.
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
          Expects an integer on the stack and pushes its string value by calling Integer.toString(int i).
 void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
          Translates an integer into an object of internal type type.
 FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
          Expects an integer on the stack and translates it to 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.NumberType
isNumber, isSimple
 
Methods inherited from class org.apache.xalan.xsltc.compiler.util.Type
CMP, DUP, getClassName, implementedAsMethod, newObjectType, newObjectType, POP, translateFrom, translateToDesynthesized
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 org.apache.bcel.generic.Type toJCType()
Overrides:
toJCType in class Type

distanceTo

public int distanceTo(Type type)
Overrides:
distanceTo in class Type
See Also:
Type.distanceTo(org.apache.xalan.xsltc.compiler.util.Type)

translateTo

public void translateTo(ClassGenerator classGen,
                        MethodGenerator methodGen,
                        Type type)
Translates an integer into an object of internal type type.
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,
                        RealType type)
Expects an integer on the stack and pushes a real.
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 integer on the stack and pushes its string value by calling Integer.toString(int i).
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 integer on the stack and pushes a 0 if its value is 0 and a 1 otherwise.
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)
Expects an integer on the stack and translates it to 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,
                        ReferenceType type)
Expects an integer on the stack and pushes a boxed integer. Boxed integers are represented by an instance of java.lang.Integer.
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,
                        java.lang.Class clazz)
Translates an integer into the Java type denoted by clazz. Expects an integer on the stack and pushes a number of the appropriate type after coercion.
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

ADD

public org.apache.bcel.generic.Instruction ADD()
Overrides:
ADD in class Type

SUB

public org.apache.bcel.generic.Instruction SUB()
Overrides:
SUB in class Type

MUL

public org.apache.bcel.generic.Instruction MUL()
Overrides:
MUL in class Type

DIV

public org.apache.bcel.generic.Instruction DIV()
Overrides:
DIV in class Type

REM

public org.apache.bcel.generic.Instruction REM()
Overrides:
REM in class Type

NEG

public org.apache.bcel.generic.Instruction NEG()
Overrides:
NEG in class Type

LOAD

public org.apache.bcel.generic.Instruction LOAD(int slot)
Overrides:
LOAD in class Type

STORE

public org.apache.bcel.generic.Instruction STORE(int slot)
Overrides:
STORE in class Type

GT

public org.apache.bcel.generic.BranchInstruction GT(boolean tozero)
Overrides:
GT in class Type

GE

public org.apache.bcel.generic.BranchInstruction GE(boolean tozero)
Overrides:
GE in class Type

LT

public org.apache.bcel.generic.BranchInstruction LT(boolean tozero)
Overrides:
LT in class Type

LE

public org.apache.bcel.generic.BranchInstruction LE(boolean tozero)
Overrides:
LE in class Type


Copyright 2006 Apache XML Project. All Rights Reserved.