|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.saxon.query.GlobalVariableDefinition
Class to hold compile-time information about an XQuery global variable or parameter
| Field Summary | |
protected java.util.List |
references
|
| Constructor Summary | |
GlobalVariableDefinition()
|
|
| Method Summary | |
GlobalVariable |
compile(StaticQueryContext env,
int slot)
Create a compiled representation of this global variable |
void |
explain(NamePool pool)
Produce diagnostic output showing the compiled and optimized expression tree for a function |
int |
getColumnNumber()
Get column number |
GlobalVariable |
getCompiledVariable()
Get the compiled variable if the definition has been compiled |
int |
getLineNumber()
Get the line number where the declaration appears |
int |
getNameCode()
Get the variable name |
java.lang.String |
getPublicId()
Get public identifier |
SequenceType |
getRequiredType()
Get the required type of the variable |
java.lang.String |
getSystemId()
Get the system ID of the module containing the variable declaration |
java.lang.String |
getVariableName()
Get the name of the variable |
java.util.Iterator |
iterateReferences()
Iterate over the references to this variable |
void |
registerReference(BindingReference ref)
Register a variable reference that refers to this global variable |
void |
setIsParameter(boolean b)
Indicate whether this global variable is a "parameter" (an external variable, in XQuery terminology) |
void |
setLineNumber(int lineNumber)
Set the line number where the variable declaration appears in the source |
void |
setNameCode(int nameCode)
Set the variable name |
void |
setRequiredType(SequenceType type)
Set the required type of the variable |
void |
setSystemId(java.lang.String systemId)
Set the system ID of the module where the variable declaration appears |
void |
setValueExpression(Expression val)
Set the expression used to define the value of the variable |
void |
setVariableName(java.lang.String variableName)
Set the variable name |
static void |
typeCheck(StaticQueryContext env,
GeneralVariable var)
Type check the compiled representation of this global variable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.List references
| Constructor Detail |
public GlobalVariableDefinition()
| Method Detail |
public void setRequiredType(SequenceType type)
type - the declared type, from the "as" clause if presentpublic SequenceType getRequiredType()
public void setNameCode(int nameCode)
nameCode - the variable name, expressed as a NamePool name codepublic int getNameCode()
getNameCode in interface VariableDeclarationpublic void setLineNumber(int lineNumber)
lineNumber - the line numberpublic int getLineNumber()
getLineNumber in interface javax.xml.transform.SourceLocatorpublic int getColumnNumber()
getColumnNumber in interface javax.xml.transform.SourceLocatorpublic java.lang.String getPublicId()
getPublicId in interface javax.xml.transform.SourceLocatorpublic void setSystemId(java.lang.String systemId)
public java.lang.String getSystemId()
getSystemId in interface javax.xml.transform.SourceLocatorpublic java.lang.String getVariableName()
getVariableName in interface VariableDeclarationpublic void setVariableName(java.lang.String variableName)
variableName - the variable name, as a lexical QNamepublic void setValueExpression(Expression val)
val - the initializing expressionpublic void setIsParameter(boolean b)
b - true if this variable is externalpublic void registerReference(BindingReference ref)
registerReference in interface VariableDeclarationref - the variable referencepublic java.util.Iterator iterateReferences()
public GlobalVariable compile(StaticQueryContext env,
int slot)
throws XPathException
env - the static context for the query moduleslot - the slot number allocated to this variable
XPathException - if compile-time errors are found.
public static void typeCheck(StaticQueryContext env,
GeneralVariable var)
throws XPathException
env - the static context for the query module
XPathException - if compile-time errors are found.public GlobalVariable getCompiledVariable()
public void explain(NamePool pool)
pool - the namepool to be used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||