org.apache.xalan.xsltc.compiler.util

Class RealType

public final class RealType extends NumberType

Author: Jacek Ambroziak Santiago Pericas-Geertsen

Method Summary
InstructionADD()
InstructionCMP(boolean less)
intdistanceTo(Type type)
InstructionDIV()
InstructionDUP()
booleanidenticalTo(Type other)
InstructionLOAD(int slot)
InstructionMUL()
InstructionNEG()
InstructionPOP()
InstructionREM()
InstructionSTORE(int slot)
InstructionSUB()
TypetoJCType()
StringtoSignature()
StringtoString()
voidtranslateBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its boxed representation.
voidtranslateFrom(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates an external (primitive) Java type into a real.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
Translates a real into an object of internal type type.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
Expects a real on the stack and pushes its string value by calling Double.toString(double d).
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Expects a real on the stack and pushes a 0 if that number is 0.0 and a 1 otherwise.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, IntType type)
Expects a real on the stack and pushes a truncated integer value
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a double on the stack and pushes a boxed double.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a real into the Java type denoted by clazz.
FlowListtranslateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a real into a non-synthesized boolean.
voidtranslateUnBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its unboxed representation.

Method Detail

ADD

public Instruction ADD()

CMP

public Instruction CMP(boolean less)

distanceTo

public int distanceTo(Type type)

See Also: Type

DIV

public Instruction DIV()

DUP

public Instruction DUP()

identicalTo

public boolean identicalTo(Type other)

LOAD

public Instruction LOAD(int slot)

MUL

public Instruction MUL()

NEG

public Instruction NEG()

POP

public Instruction POP()

REM

public Instruction REM()

STORE

public Instruction STORE(int slot)

SUB

public Instruction SUB()

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.

translateFrom

public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates an external (primitive) Java type into a real. Expects a java object on the stack and pushes a real (i.e., a double).

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
Translates a real into an object of internal type type. The translation to int is undefined since reals are never converted to ints.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)
Expects a real on the stack and pushes its string value by calling Double.toString(double d).

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Expects a real on the stack and pushes a 0 if that number is 0.0 and a 1 otherwise.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, IntType type)
Expects a real on the stack and pushes a truncated integer value

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a double on the stack and pushes a boxed double. Boxed double are represented by an instance of java.lang.Double.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a real into the Java type denoted by clazz. Expects a real on the stack and pushes a number of the appropriate type after coercion.

translateToDesynthesized

public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a real 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. A NaN must be converted to "false".

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.