|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xpath.Expression org.apache.xpath.operations.Variable
The variable reference expression executer.
Field Summary | |
private boolean |
m_fixUpWasCalled
Tell if fixupVariables was called. |
protected int |
m_index
The index of the variable, which is either an absolute index to a global, or, if higher than the globals area, must be adjusted by adding the offset to the current stack frame. |
protected boolean |
m_isGlobal
|
protected QName |
m_qname
The qualified name of the variable. |
(package private) static String |
PSUEDOVARNAMESPACE
|
Fields inherited from class org.apache.xpath.Expression |
|
Constructor Summary | |
Variable()
|
Method Summary | |
void |
callVisitors(ExpressionOwner owner,
XPathVisitor visitor)
This will traverse the heararchy, calling the visitor for each member. |
boolean |
deepEquals(Expression expr)
Compare this object with another object and see if they are equal, include the sub heararchy. |
XObject |
execute(XPathContext xctxt)
Execute an expression in the XPath runtime context, and return the result of the expression. |
XObject |
execute(XPathContext xctxt,
boolean destructiveOK)
Dereference the variable, and return the reference value. |
void |
fixupVariables(Vector vars,
int globalsSize)
This function is used to fixup variables from QNames to stack frame indexes at stylesheet build time. |
int |
getAnalysisBits()
Get the analysis bits for this walker, as defined in the WalkerFactory. |
ElemVariable |
getElemVariable()
Get the XSLT ElemVariable that this sub-expression references. |
boolean |
getGlobal()
Set the index for the variable into the stack. |
int |
getIndex()
Set the index for the variable into the stack. |
QName |
getQName()
Get the qualified name of the variable. |
boolean |
isPsuedoVarRef()
Tell if this is a psuedo variable reference, declared by Xalan instead of by the user. |
boolean |
isStableNumber()
Tell if this expression returns a stable number that will not change during iterations within the expression. |
void |
setIndex(int index)
Set the index for the variable into the stack. |
void |
setIsGlobal(boolean isGlobal)
Set whether or not this is a global reference. |
void |
setQName(QName qname)
Set the qualified name of the variable. |
Methods inherited from class org.apache.xpath.Expression |
asIterator, asIteratorRaw, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, executeCharsToContentHandler, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isNodesetExpr, isSameClass, num, warn, xstr |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private boolean m_fixUpWasCalled
protected QName m_qname
protected int m_index
protected boolean m_isGlobal
static final String PSUEDOVARNAMESPACE
Constructor Detail |
public Variable()
Method Detail |
public void setIndex(int index)
index
- a global or local index.public int getIndex()
public void setIsGlobal(boolean isGlobal)
isGlobal
- true if this should be a global variable reference.public boolean getGlobal()
public void fixupVariables(Vector vars, int globalsSize)
fixupVariables
in class Expression
vars
- List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector from the start of the vector will be its position
in the stack frame (but variables above the globalsTop value will need
to be offset to the current stack frame).public void setQName(QName qname)
qname
- Must be a non-null reference to a qualified name.public QName getQName()
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
execute
in class Expression
xctxt
- The XPath runtime context.
XObject
.
javax.xml.transform.TransformerException
- if a runtime exception
occurs.public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException
execute
in class Expression
xctxt
- The runtime execution context.destructiveOK
- true if a "safe" object doesn't need to be returned.
javax.xml.transform.TransformerException
public ElemVariable getElemVariable()
public boolean isStableNumber()
isStableNumber
in class Expression
public int getAnalysisBits()
getAnalysisBits
in interface PathComponent
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
XPathVisitable
callVisitors
in interface XPathVisitable
owner
- The owner of the visitor, where that path may be
rewritten if needed.visitor
- The visitor whose appropriate method will be called.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
public boolean deepEquals(Expression expr)
Expression
deepEquals
in class Expression
expr
- Another expression object.
Expression.deepEquals(Expression)
public boolean isPsuedoVarRef()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |