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

public final Class ObjectType

extends Type
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.ALOAD, .ASTORE, .BranchHandle, .ConstantPoolGen, .GOTO, .IFNULL, .INVOKEVIRTUAL, .Instruction, .InstructionList, .PUSH, com.sun.org.apache.xalan.internal.utils.ObjectFactory, com.sun.org.apache.xalan.internal.xsltc.compiler.Constants

Authors
Todd Miller, Santiago Pericas-Geertsen

Field Summary

Modifier and TypeField and Description
private Class<?>
private String
Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type:
AttributeBooleanCommentElementIntNodeNodeSetObjectObjectStringProcessing_InstructionRealReferenceResultTreeRootStringTextVoid

Constructor Summary

AccessConstructor and Description
protected
ObjectType(String
name of the class such as 'com.foo.Processor'
javaClassName
)

Used to represent a Java Class type such is required to support non-static java functions.

protected
ObjectType(Class<?> clazz)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public Class<?>
public String
public int
hashCode()

Overrides java.lang.Object.hashCode.

Must return the same value for all ObjectType instances.
public boolean
identicalTo(Type other)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.identicalTo.

Returns true if this and other are identical types.
public Instruction
public Instruction
public Type
public String
toSignature()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toSignature.

Returns the signature of an internal type's external representation.
public String
toString()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toString.

Returns a string representation of this type.
public void
translateFrom(ClassGenerator classGen, MethodGenerator methodGen, Class<?> clazz)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateFrom.

Translates an external Java type into an Object type
public void
translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateTo.

Translates a void into an object of internal type type.
public void
translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)

Expects an integer on the stack and pushes its string value by calling Integer.toString(int i).

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

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateTo.

Translates an object of this type to the external (Java) type denoted by clazz.
Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type:
ADDCMPdistanceToDIVDUPGEgetClassNameGTimplementedAsMethodisNumberisSimpleLELTMULNEGnewObjectTypenewObjectTypePOPREMSUBtranslateBoxtranslateToDesynthesizedtranslateToDesynthesizedtranslateUnBox

Field Detail

_clazzback to summary
private Class<?> _clazz
_javaClassNameback to summary
private String _javaClassName

Constructor Detail

ObjectTypeback to summary
protected ObjectType(String javaClassName)

Used to represent a Java Class type such is required to support non-static java functions.

Parameters
javaClassName:String

name of the class such as 'com.foo.Processor'

ObjectTypeback to summary
protected ObjectType(Class<?> clazz)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

getJavaClassback to summary
public Class<?> getJavaClass()
getJavaClassNameback to summary
public String getJavaClassName()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Must return the same value for all ObjectType instances. This is needed in CastExpr to ensure the mapping table is used correctly.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object

identicalToback to summary
public boolean identicalTo(Type other)

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.identicalTo.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.identicalTo.

Returns true if this and other are identical types.

LOADback to summary
public Instruction LOAD(int slot)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.LOAD.

STOREback to summary
public Instruction STORE(int slot)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.STORE.

toJCTypeback to summary
public Type toJCType()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toJCType.

toSignatureback to summary
public String toSignature()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toSignature.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toSignature.

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

toStringback to summary
public String toString()

Implements abstract com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toString.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.toString.

Returns a string representation of this type.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

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

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateFrom.

Translates an external Java type into an Object type

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

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateTo.

Translates a void into an object of internal type type. This translation is needed when calling external functions that return void.

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type)

Expects an integer on the stack and pushes its string value by calling Integer.toString(int i).

See Also
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
translateToback to summary
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Class<?> clazz)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.translateTo.

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.