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

public final Class NodeType

extends Type
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.BranchHandle, .CHECKCAST, .ConstantPoolGen, .GETFIELD, .GOTO, .IFEQ, .ILOAD, .INVOKEINTERFACE, .INVOKESPECIAL, .ISTORE, .Instruction, .InstructionList, .NEW, .PUSH, com.sun.org.apache.xalan.internal.xsltc.compiler.Constants, .FlowList, .NodeTest

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen

Field Summary

Modifier and TypeField and Description
private final int
Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type:
AttributeBooleanCommentElementIntNodeNodeSetObjectObjectStringProcessing_InstructionRealReferenceResultTreeRootStringTextVoid

Constructor Summary

AccessConstructor and Description
protected
protected
NodeType(int type)

Method Summary

Modifier and TypeMethod and Description
public String
getClassName()

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

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

public int
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

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
translateBox(ClassGenerator classGen, MethodGenerator methodGen)

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

Translates an object of this type to its boxed representation.

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

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

Translates a node into an object of internal type type.

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

Expects a node on the stack and pushes its string value.

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

Translates a node into a synthesized boolean.

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

Expects a node on the stack and pushes a real.

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

Expects a node on the stack and pushes a singleton node-set.

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

Subsume Node into ObjectType.

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

Expects a node on the stack and pushes a boxed node.

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

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

Translates a node into the Java type denoted by clazz.

public FlowList
public void
translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)

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

Translates an object of this type to its unboxed representation.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type:
ADDCMPdistanceToDIVDUPGEGTimplementedAsMethodisNumberisSimpleLELTMULNEGnewObjectTypenewObjectTypePOPREMSUBtranslateFromtranslateToDesynthesized

Field Detail

_typeback to summary
private final int _type

Constructor Detail

NodeTypeback to summary
protected NodeType()
NodeTypeback to summary
protected NodeType(int type)

Method Detail

getClassNameback to summary
public String getClassName()

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

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

getTypeback to summary
public int getType()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
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.

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

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

Translates an object of this type to its boxed representation.

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 node into an object of internal type type. The translation to int is undefined since nodes are always converted to reals in arithmetic expressions.

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 a node on the stack and pushes its string value.

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

Translates a node into a synthesized boolean. If the expression is "@attr", then "true" is pushed iff "attr" is an attribute of the current node. If the expression is ".", the result is always "true".

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

Expects a node on the stack and pushes a real. First the node is converted to string, and from string to real.

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

Expects a node on the stack and pushes a singleton node-set. Singleton iterators are already started after construction.

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

Subsume Node into ObjectType.

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

Expects a node on the stack and pushes a boxed node. Boxed nodes are represented by an instance of com.sun.org.apache.xalan.internal.xsltc.dom.Node.

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 a node into the Java type denoted by clazz. Expects a node on the stack and pushes an object of the appropriate type after coercion.

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

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

Translates a node 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
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateToDesynthesized
translateUnBoxback to summary
public void translateUnBox(ClassGenerator classGen, MethodGenerator methodGen)

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

Translates an object of this type to its unboxed representation.