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

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

public final class BooleanType
extends Type

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.BranchInstruction` `GE(boolean tozero)`
`org.apache.bcel.generic.BranchInstruction` `GT(boolean tozero)`
`boolean` `identicalTo(Type other)`
`boolean` `isSimple()`
`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` `STORE(int slot)`
`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 (Java) boolean into internal boolean.
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, java.lang.Class clazz)` Translates an internal boolean into an external (Java) boolean.
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)` Expects a boolean on the stack and pushes a real.
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)` Expects a boolean on the stack and pushes a boxed boolean.
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)` Expects a boolean on the stack and pushes a string.
`void` `translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)` Translates a real into an object of internal type `type`.
`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, getClassName, implementedAsMethod, isNumber, MUL, NEG, newObjectType, newObjectType, POP, REM, SUB, translateToDesynthesized, 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

### isSimple

    public boolean isSimple()

  Overrides:
    isSimple in class Type

### toJCType

    public org.apache.bcel.generic.Type toJCType()

  Overrides:
    toJCType in class 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 booleans 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,
                            StringType type)

  Expects a boolean on the stack and pushes a string. If the value on the stack is zero, then the string 'false' is pushed. Otherwise, the string 'true' is pushed.
  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 a boolean on the stack and pushes a real. The value "true" is converted to 1.0 and the value "false" to 0.0.
  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 boolean on the stack and pushes a boxed boolean. Boxed booleans are represented by an instance of `java.lang.Boolean`.
  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 internal boolean into an external (Java) boolean.
  Overrides:
    translateTo in class Type

### translateFrom

    public void translateFrom(ClassGenerator classGen,
                              MethodGenerator methodGen,
                              java.lang.Class clazz)

  Translates an external (Java) boolean into internal boolean.
  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

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