|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xalan.xsltc.compiler.SyntaxTreeNode
org.apache.xalan.xsltc.compiler.Expression
org.apache.xalan.xsltc.compiler.LogicalExpr
final class LogicalExpr
| Field Summary | |
|---|---|
private Expression |
_left
|
private int |
_op
|
private Expression |
_right
|
static int |
AND
|
private static java.lang.String[] |
Ops
|
static int |
OR
|
| Fields inherited from class org.apache.xalan.xsltc.compiler.Expression |
|---|
_falseList, _trueList, _type |
| Fields inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
|---|
_attributes, _parent, _qname, Dummy, IndentIncrement, UNKNOWN_STYLESHEET_NODE_ID |
| Constructor Summary | |
|---|---|
LogicalExpr(int op,
Expression left,
Expression right)
Creates a new logical expression - either OR or AND. |
|
| Method Summary | |
|---|---|
java.lang.Object |
evaluateAtCompileTime()
Returns an object representing the compile-time evaluation of an expression. |
int |
getOp()
Returns this logical expression's operator - OR or AND represented by 0 and 1 respectively. |
boolean |
hasLastCall()
Returns true if this expressions contains a call to last() |
boolean |
hasPositionCall()
Returns true if this expressions contains a call to position(). |
void |
setParser(Parser parser)
Override the SyntaxTreeNode.setParser() method to make sure that the parser is set for sub-expressions |
java.lang.String |
toString()
Returns a string describing this expression |
void |
translate(ClassGenerator classGen,
MethodGenerator methodGen)
Compile the expression - leave boolean expression on stack |
void |
translateDesynthesized(ClassGenerator classGen,
MethodGenerator methodGen)
Compile expression and update true/false-lists |
Type |
typeCheck(SymbolTable stable)
Type-check this expression, and possibly child expressions. |
| Methods inherited from class org.apache.xalan.xsltc.compiler.Expression |
|---|
backPatchFalseList, backPatchTrueList, compile, desynthesize, getFalseList, getTrueList, getType, lookupPrimop, startIterator, synthesize |
| Methods inherited from class org.apache.xalan.xsltc.compiler.SyntaxTreeNode |
|---|
addAttribute, addElement, addPrefixMapping, compileResultTree, contextDependent, dependentContents, display, displayContents, elementAt, elementCount, elements, getAttribute, getAttribute, getAttributes, getContents, getImportPrecedence, getLineNumber, getNodeIDForStylesheetNSLookup, getParent, getParser, getPrefixMapping, getQName, getStylesheet, getSymbolTable, getTemplate, getXSLTC, hasAttribute, hasContents, indent, isDummy, lastChild, lookupNamespace, lookupPrefix, parseChildren, parseContents, removeElement, reportError, reportWarning, setAttributes, setFirstElement, setLineNumber, setParent, setPrefixMapping, setQName, setQName, translateContents, typeCheckContents, updateScope |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int OR
public static final int AND
private final int _op
private Expression _left
private Expression _right
private static final java.lang.String[] Ops
| Constructor Detail |
|---|
public LogicalExpr(int op,
Expression left,
Expression right)
| Method Detail |
|---|
public boolean hasPositionCall()
hasPositionCall in class Expressionpublic boolean hasLastCall()
hasLastCall in class Expressionpublic java.lang.Object evaluateAtCompileTime()
evaluateAtCompileTime in class Expressionpublic int getOp()
public void setParser(Parser parser)
setParser in class SyntaxTreeNodeparser - The XSLT parser.public java.lang.String toString()
toString in class Expression
public Type typeCheck(SymbolTable stable)
throws TypeCheckError
typeCheck in class Expressionstable - The compiler/parser's symbol table
TypeCheckError
public void translate(ClassGenerator classGen,
MethodGenerator methodGen)
translate in class ExpressionclassGen - BCEL Java class generatormethodGen - BCEL Java method generator
public void translateDesynthesized(ClassGenerator classGen,
MethodGenerator methodGen)
translateDesynthesized in class Expression
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||