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

pack-priv Class FilterExpr

extends Expression
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.ALOAD, .ASTORE, .ConstantPoolGen, .ILOAD, .INVOKESPECIAL, .ISTORE, .InstructionList, .LocalVariableGen, .NEW, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator, .MethodGenerator, .NodeSetType, .ReferenceType, .Type, .TypeCheckError, .Util, java.util.List

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private final List<Expression>
_predicates

Array of predicates in '(e)[p1]...[pn]'.

private Expression
_primary

Primary expression of this filter.

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

Constructor Summary

AccessConstructor and Description
public
FilterExpr(Expression primary, List<Expression> predicates)

Method Summary

Modifier and TypeMethod and Description
protected Expression
public void
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 a filter expression by pushing the appropriate iterator onto the stack.

private void
translateFilterExpr(ClassGenerator classGen, MethodGenerator methodGen, int predicateIndex)

public void
translatePredicates(ClassGenerator classGen, MethodGenerator methodGen, int predicateIndex)

Translate a sequence of predicates.

public Type
Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.Expression:
backPatchFalseListbackPatchTrueListcompiledesynthesizeevaluateAtCompileTimegetFalseListgetTrueListgetTypehasLastCallhasPositionCalllookupPrimopstartIteratorsynthesizetranslateDesynthesized

Field Detail

_predicatesback to summary
private final List<Expression> _predicates

Array of predicates in '(e)[p1]...[pn]'.

_primaryback to summary
private Expression _primary

Primary expression of this filter. I.e., 'e' in '(e)[p1]...[pn]'.

Constructor Detail

FilterExprback to summary
public FilterExpr(Expression primary, List<Expression> predicates)

Method Detail

getExprback to summary
protected Expression getExpr()
setParserback to summary
public void setParser(Parser parser)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.setParser.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.setParser.

Set this node's parser. The parser (the XSLT parser) gives this syntax tree node access to the symbol table and XPath parser.

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.

Translate a filter expression by pushing the appropriate iterator onto the stack.

translateFilterExprback to summary
private void translateFilterExpr(ClassGenerator classGen, MethodGenerator methodGen, int predicateIndex)
translatePredicatesback to summary
public void translatePredicates(ClassGenerator classGen, MethodGenerator methodGen, int predicateIndex)

Translate a sequence of predicates. Each predicate is translated by constructing an instance of CurrentNodeListIterator which is initialized from another iterator (recursive call), a filter and a closure (call to translate on the predicate) and "this".

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

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

Type check a FilterParentPath. If the filter is not a node-set add a cast to node-set only if it is of reference type. This type coercion is needed for expressions like $x where $x is a parameter reference. All optimizations are turned off before type checking underlying predicates.