APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler.util

public abstract Class Type

extends Object
implements Constants
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xalan.internal.xsltc.compiler.Constants
Known Direct Subclasses
com.sun.org.apache.xalan.internal.xsltc.compiler.util.VoidType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.BooleanType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.NodeSetType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.NodeType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.NumberType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ObjectType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ResultTreeType, com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType
Imports
com.sun.org.apache.bcel.internal.generic.BranchInstruction, .Instruction, com.sun.org.apache.xalan.internal.xsltc.compiler.Constants, .FlowList, .NodeTest

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type
public static final Type

Constructor Summary

AccessConstructor and Description
public
Type()

Method Summary

Modifier and TypeMethod and Description
public Instruction
ADD()

public Instruction
CMP(boolean less)

public int
distanceTo(Type type)

Returns the distance between two types.

public Instruction
DIV()

public Instruction
DUP()

public BranchInstruction
GE(boolean tozero)

public String
getClassName()

Returns the class name of an internal type's external representation.

public BranchInstruction
GT(boolean tozero)

public abstract boolean
identicalTo(Type other)

Returns true if this and other are identical types.

public boolean
implementedAsMethod()

Returns true if this type has no object representaion.

public boolean
isNumber()

Returns true if this type is a numeric type.

public boolean
isSimple()

Returns true if this type is a simple type.

public BranchInstruction
LE(boolean tozero)

public Instruction
LOAD(int slot)

public BranchInstruction
LT(boolean tozero)

public Instruction
MUL()

public Instruction
NEG()

public static Type
newObjectType(String javaClassName)

Factory method to instantiate object types.

public static Type
newObjectType(Class<?> clazz)

Factory method to instantiate object types.

public Instruction
POP()

public Instruction
REM()

public Instruction
STORE(int slot)

public Instruction
SUB()

public abstract Type
public abstract String
toSignature()

Returns the signature of an internal type's external representation.

public abstract String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of this type.

public void
translateBox(ClassGenerator classGen, MethodGenerator methodGen)

Translates an object of this type to its boxed representation.

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

Translates an external (Java) type denoted by clazz to an object of this type.

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

Translates an object of this type to an object of type type.

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

Translates an object of this type to the external (Java) type denoted by clazz.

public FlowList
translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, Type type)

Translates object of this type to an object of type type.

public FlowList
translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)

Translates an object of this type to an non-synthesized boolean.

public void
translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)

Translates an object of this type to its unboxed representation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

Attributeback to summary
public static final Type Attribute
Booleanback to summary
public static final Type Boolean
Commentback to summary
public static final Type Comment
Elementback to summary
public static final Type Element
Intback to summary
public static final Type Int
Nodeback to summary
public static final Type Node
NodeSetback to summary
public static final Type NodeSet
Objectback to summary
public static final Type Object
ObjectStringback to summary
public static final Type ObjectString
Processing_Instructionback to summary
public static final Type Processing_Instruction
Realback to summary
public static final Type Real
Referenceback to summary
public static final Type Reference
ResultTreeback to summary
public static final Type ResultTree
Rootback to summary
public static final Type Root
Stringback to summary
public static final Type String
Textback to summary
public static final Type Text
Voidback to summary
public static final Type Void

Constructor Detail

Typeback to summary
public Type()

Method Detail

ADDback to summary
public Instruction ADD()
CMPback to summary
public Instruction CMP(boolean less)
distanceToback to summary
public int distanceTo(Type type)

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

DIVback to summary
public Instruction DIV()
DUPback to summary
public Instruction DUP()
GEback to summary
public BranchInstruction GE(boolean tozero)
getClassNameback to summary
public String getClassName()

Returns the class name of an internal type's external representation.

GTback to summary
public BranchInstruction GT(boolean tozero)
identicalToback to summary
public abstract boolean identicalTo(Type other)

Returns true if this and other are identical types.

implementedAsMethodback to summary
public boolean implementedAsMethod()

Returns true if this type has no object representaion. Redefined in ResultTreeType.

isNumberback to summary
public boolean isNumber()

Returns true if this type is a numeric type. Redefined in NumberType.

isSimpleback to summary
public boolean isSimple()

Returns true if this type is a simple type. Redefined in NumberType, BooleanType and StringType.

LEback to summary
public BranchInstruction LE(boolean tozero)
LOADback to summary
public Instruction LOAD(int slot)
LTback to summary
public BranchInstruction LT(boolean tozero)
MULback to summary
public Instruction MUL()
NEGback to summary
public Instruction NEG()
newObjectTypeback to summary
public static Type newObjectType(String javaClassName)

Factory method to instantiate object types. Returns a pre-defined instance for "java.lang.Object" and "java.lang.String".

newObjectTypeback to summary
public static Type newObjectType(Class<?> clazz)

Factory method to instantiate object types. Returns a pre-defined instance for java.lang.Object.class and java.lang.String.class.

POPback to summary
public Instruction POP()
REMback to summary
public Instruction REM()
STOREback to summary
public Instruction STORE(int slot)
SUBback to summary
public Instruction SUB()
toJCTypeback to summary
public abstract Type toJCType()
toSignatureback to summary
public abstract String toSignature()

Returns the signature of an internal type's external representation.

toStringback to summary
public abstract String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this type.

translateBoxback to summary
public void translateBox(ClassGenerator classGen, MethodGenerator methodGen)

Translates an object of this type to its boxed representation.

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

Translates an external (Java) type denoted by clazz to an object of this type. This method is used to translate return values when external functions are called.

translateToback to summary
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)

Translates an object of this type to an object of type type. Expects an object of the former type and pushes an object of the latter.

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

Translates an object of this type to the external (Java) type denoted by clazz. This method is used to translate parameters when external functions are called.

translateToDesynthesizedback to summary
public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, Type type)

Translates object of this type to an object of type type. Expects an object of the former type and pushes an object of the latter if not boolean. If type type is boolean then a branchhandle list (to be appended to the false list) is returned.

translateToDesynthesizedback to summary
public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type)

Translates an object of this type to an non-synthesized boolean. It does not push a 0 or a 1 but instead returns branchhandle list to be appended to the false list.

translateUnBoxback to summary
public void translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)

Translates an object of this type to its unboxed representation.