org.apache.xalan.xsltc.compiler.util

Class StringType

public class StringType extends Type

Author: Jacek Ambroziak Santiago Pericas-Geertsen

Method Summary
StringgetClassName()
Returns the class name of an internal type's external representation.
booleanidenticalTo(Type other)
booleanisSimple()
InstructionLOAD(int slot)
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 (primitive) Java type into a string.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
Translates a string into an object of internal type type.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a string into a synthesized boolean.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
Translates a string into a real by calling stringToReal() from the basis library.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a string on the stack and pushes a boxed string.
voidtranslateTo(ClassGenerator classGen, MethodGenerator methodGen, Class clazz)
Translates a internal string into an external (Java) string.
FlowListtranslateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a string into a non-synthesized boolean.
voidtranslateUnBox(ClassGenerator classGen, MethodGenerator methodGen)
Translates an object of this type to its unboxed representation.

Method Detail

getClassName

public String getClassName()
Returns the class name of an internal type's external representation.

identicalTo

public boolean identicalTo(Type other)

isSimple

public boolean isSimple()

LOAD

public Instruction LOAD(int slot)

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 (primitive) Java type into a string.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)
Translates a string into an object of internal type type. The translation to int is undefined since strings are always converted to reals in arithmetic expressions.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a string into a synthesized boolean.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type)
Translates a string into a real by calling stringToReal() from the basis library.

See Also: Type

translateTo

public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, ReferenceType type)
Expects a string on the stack and pushes a boxed string. Strings are already boxed so the translation is just a NOP.

See Also: Type

translateTo

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

See Also: Type

translateToDesynthesized

public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)
Translates a string 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.

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.