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

pack-priv final Class CastExpr

extends Expression
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.ConstantPoolGen, .IF_ICMPNE, .INVOKEINTERFACE, .InstructionList, .SIPUSH, com.sun.org.apache.xalan.internal.xsltc.compiler.util.BooleanType, .ClassGenerator, .ErrorMsg, .MethodGenerator, .MultiHashtable, .NodeType, .ResultTreeType, .Type, .TypeCheckError, com.sun.org.apache.xml.internal.dtm.Axis

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen, Erwin Bolwidt

Field Summary

Modifier and TypeField and Description
private final Expression
private boolean
private static final MultiHashtable<Type, Type>
InternalTypeMap

Legal conversions between internal types.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.Expression:
_falseList_trueList_type

Constructor Summary

AccessConstructor and Description
public
CastExpr(Expression left, Type type)

Construct a cast expression and check that the conversion is valid by calling typeCheck().

Method Summary

Modifier and TypeMethod and Description
public Expression
public boolean
public boolean
hasPositionCall()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.hasPositionCall.

Returns true if this expressions contains a call to position().

public String
toString()

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

Returns a string representation of the object.

public void
translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.translate.

Translate this node into JVM bytecodes.

public void
translateDesynthesized(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.translateDesynthesized.

Redefined by expressions of type boolean that use flow lists.

public Type
typeCheck(SymbolTable stable)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.typeCheck.

Type checking a cast expression amounts to verifying that the type conversion is legal.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.Expression:
backPatchFalseListbackPatchTrueListcompiledesynthesizeevaluateAtCompileTimegetFalseListgetTrueListgetTypelookupPrimopstartIteratorsynthesize

Field Detail

_leftback to summary
private final Expression _left
_typeTestback to summary
private boolean _typeTest
InternalTypeMapback to summary
private static final MultiHashtable<Type, Type> InternalTypeMap

Legal conversions between internal types.

Constructor Detail

CastExprback to summary
public CastExpr(Expression left, Type type) throws TypeCheckError

Construct a cast expression and check that the conversion is valid by calling typeCheck().

Method Detail

getExprback to summary
public Expression getExpr()
hasLastCallback to summary
public boolean hasLastCall()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.hasLastCall.

hasPositionCallback to summary
public boolean hasPositionCall()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.hasPositionCall.

Returns true if this expressions contains a call to position(). This is needed for context changes in node steps containing multiple predicates.

toStringback to summary
public String toString()

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

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

translateback to summary
public void translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.translate.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.translate.

Translate this node into JVM bytecodes.

translateDesynthesizedback to summary
public void translateDesynthesized(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.translateDesynthesized.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.translateDesynthesized.

Redefined by expressions of type boolean that use flow lists.

typeCheckback to summary
public Type typeCheck(SymbolTable stable) throws TypeCheckError

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.typeCheck.

Type checking a cast expression amounts to verifying that the type conversion is legal. Cast expressions are created during type checking, but typeCheck() is usually not called on them. As a result, this method is called from the constructor.