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

public final Class RealType

extends NumberType
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.BranchHandle, .CHECKCAST, .ConstantPoolGen, .DLOAD, .DSTORE, .GOTO, .IFEQ, .IFNE, .INVOKESPECIAL, .INVOKESTATIC, .INVOKEVIRTUAL, .Instruction, .InstructionConst, .InstructionList, .LocalVariableGen, .NEW, com.sun.org.apache.xalan.internal.xsltc.compiler.Constants, .FlowList

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public Instruction
public Instruction
public int
distanceTo(Type type)

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

Returns the distance between two types.
public Instruction
public Instruction
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 Instruction
public Instruction
public Instruction
public Instruction
public Instruction
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
translateFrom(ClassGenerator classGen, MethodGenerator methodGen, Class<?> clazz)

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

Translates an external (primitive) Java type into a real.
public void
translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)

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

Translates a real into an object of internal type type.
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).

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.

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

Expects a real on the stack and pushes a truncated integer value

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

Expects a double on the stack and pushes a boxed double.

public void
translateTo(ClassGenerator classGen, MethodGenerator methodGen, final Class<?> clazz)

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

Translates a real into the Java type denoted by clazz.
public FlowList
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.NumberType:
isNumberisSimple

Constructor Detail

RealTypeback to summary
protected RealType()

Method Detail

ADDback to summary
public Instruction ADD()

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

CMPback to summary
public Instruction CMP(boolean less)

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

distanceToback to summary
public int distanceTo(Type type)

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

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

Returns the distance between two types. This measure is used to select overloaded functions/operators. This method is typically redefined by the subclasses.

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#distanceTo
DIVback to summary
public Instruction DIV()

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

DUPback to summary
public Instruction DUP()

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

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.

LOADback to summary
public Instruction LOAD(int slot)

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

MULback to summary
public Instruction MUL()

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

NEGback to summary
public Instruction NEG()

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

POPback to summary
public Instruction POP()

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

REMback to summary
public Instruction REM()

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

STOREback to summary
public Instruction STORE(int slot)

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

SUBback to summary
public Instruction SUB()

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

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.

translateFromback to summary
public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen, Class<?> clazz)

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

Translates an external (primitive) Java type into a real. Expects a java object on the stack and pushes a real (i.e., a double).

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 real into an object of internal type type. The translation to int is undefined since reals are never converted to ints.

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 a real on the stack and pushes its string value by calling Double.toString(double d).

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 a real on the stack and pushes a 0 if that number is 0.0 and a 1 otherwise.

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

Expects a real on the stack and pushes a truncated integer value

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 double on the stack and pushes a boxed double. Boxed double are represented by an instance of java.lang.Double.

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

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

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.

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 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
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.