## org.apache.xalan.xsltc.compiler.util
Class RealType

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

public final class RealType
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()`
`org.apache.bcel.generic.Instruction` `CMP(boolean less)`
`int` `distanceTo(Type type)`
`org.apache.bcel.generic.Instruction` `DIV()`
`org.apache.bcel.generic.Instruction` `DUP()`
`boolean` `identicalTo(Type other)`
`org.apache.bcel.generic.Instruction` `LOAD(int slot)`
`org.apache.bcel.generic.Instruction` `MUL()`
`org.apache.bcel.generic.Instruction` `NEG()`
`org.apache.bcel.generic.Instruction` `POP()`
`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` `translateFrom(ClassGenerator classGen, MethodGenerator methodGen, java.lang.Class clazz)` Translates an external (primitive) Java type into a real.
`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.
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, java.lang.Class clazz)` Translates a real into the Java type denoted by `clazz`.
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, IntType type)` Expects a real on the stack and pushes a truncated integer value
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)` Expects a double on the stack and pushes a boxed double.
`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)`.
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)` Translates a real into an object of internal type `type`.
`FlowList` `translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)` Translates a real 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.NumberType
`isNumber, isSimple`

Methods inherited from class org.apache.xalan.xsltc.compiler.util.Type
`GE, getClassName, GT, implementedAsMethod, LE, LT, newObjectType, newObjectType, 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 a real into an object of internal type `type`. The translation to int is undefined since reals are never converted to ints.
  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,
                            StringType type)

  Expects a real on the stack and pushes its string value by calling `Double.toString(double d)`.
  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 a real on the stack and pushes a 0 if that number is 0.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)`

### 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(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 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".
  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 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(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 real into the Java type denoted by `clazz`. Expects a real on the stack and pushes a number of the appropriate type after coercion.
  Overrides:
    translateTo in class Type

### translateFrom

    public void translateFrom(ClassGenerator classGen,
                              MethodGenerator methodGen,
                              java.lang.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).
  Overrides:
    translateFrom 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

### POP

    public org.apache.bcel.generic.Instruction POP()

  Overrides:
    POP in class Type

### CMP

    public org.apache.bcel.generic.Instruction CMP(boolean less)

  Overrides:
    CMP in class Type

### DUP

    public org.apache.bcel.generic.Instruction DUP()

  Overrides:
    DUP in class Type

Copyright © 2006 Apache XML Project. All Rights Reserved.