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

pack-priv Class VariableRefBase

extends Expression
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xalan.internal.xsltc.compiler.ParameterRef, com.sun.org.apache.xalan.internal.xsltc.compiler.UnresolvedRef, com.sun.org.apache.xalan.internal.xsltc.compiler.VariableRef
Imports
com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type, .TypeCheckError, java.util.Objects

Authors
Morten Jorgensen, Santiago Pericas-Geertsen

Field Summary

Modifier and TypeField and Description
protected Closure
_closure

A reference to the enclosing expression/instruction for which a closure is needed (Predicate, Number or Sort).

protected VariableBase
_variable

A reference to the associated variable.

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

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
addParentDependency()

If this variable reference is in a top-level element like another variable, param or key, add a dependency between that top-level element and the referenced variable.

public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Two variable references are deemed equal if they refer to the same variable.

public VariableBase
getVariable()

Returns a reference to the associated variable

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String

Returns:

Variable reference description
toString
()

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

Returns a string representation of this variable reference on the format 'variable-ref(<var-name>)'.

public Type
typeCheck(SymbolTable stable)

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

Type check all the children of this node.

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

Field Detail

_closureback to summary
protected Closure _closure

A reference to the enclosing expression/instruction for which a closure is needed (Predicate, Number or Sort).

_variableback to summary
protected VariableBase _variable

A reference to the associated variable.

Constructor Detail

VariableRefBaseback to summary
public VariableRefBase(VariableBase variable)
VariableRefBaseback to summary
public VariableRefBase()

Method Detail

addParentDependencyback to summary
public void addParentDependency()

If this variable reference is in a top-level element like another variable, param or key, add a dependency between that top-level element and the referenced variable. For example, <xsl:variable name="x" .../> <xsl:variable name="y" select="$x + 1"/> and assuming this class represents "$x", add a reference between variable y and variable x.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Two variable references are deemed equal if they refer to the same variable.

Annotations
@Override
getVariableback to summary
public VariableBase getVariable()

Returns a reference to the associated variable

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.
Annotations
@Override
toStringback to summary
public String toString()

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

Returns a string representation of this variable reference on the format 'variable-ref(<var-name>)'.

Returns:String

Variable reference description

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

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

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

Type check all the children of this node.

Annotations
@Override