org.apache.xalan.xsltc.compiler.util

Class BooleanType

public final class BooleanType extends Type

Author: Jacek Ambroziak Santiago Pericas-Geertsen

Method Summary
BranchInstructionGE(boolean tozero)
BranchInstructionGT(boolean tozero)
booleanidenticalTo(Type other)
booleanisSimple()
BranchInstructionLE(boolean tozero)
InstructionLOAD(int slot)
BranchInstructionLT(boolean tozero)
InstructionSTORE(int slot)
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 (Java) boolean into internal boolean.
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 boolean on the stack and pushes a string.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
Expects a boolean on the stack and pushes a real.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a boolean on the stack and pushes a boxed boolean.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates an internal boolean into an external (Java) boolean.
voidtranslateUnBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its unboxed representation.

Method Detail

GE

public BranchInstruction GE(boolean tozero)

GT

public BranchInstruction GT(boolean tozero)

identicalTo

public boolean identicalTo(Type other)

isSimple

public boolean isSimple()

LE

public BranchInstruction LE(boolean tozero)

LOAD

public Instruction LOAD(int slot)

LT

public BranchInstruction LT(boolean tozero)

STORE

public Instruction STORE(int slot)

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

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.

See Also: 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

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

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

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates an internal boolean into an external (Java) boolean.

translateUnBox

public void translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its unboxed representation.
Copyright B) 2006 Apache XML Project. All Rights Reserved.