net.sf.saxon.query
Class GlobalVariableDefinition

java.lang.Object
  |
  +--net.sf.saxon.query.GlobalVariableDefinition
All Implemented Interfaces:
VariableDeclaration

public class GlobalVariableDefinition
extends java.lang.Object
implements VariableDeclaration

Class to hold compile-time information about an XQuery global variable or parameter


Constructor Summary
GlobalVariableDefinition()
           
 
Method Summary
 GeneralVariable compile(StaticQueryContext env, int slot)
           
 int getVariableFingerprint()
          Get the fingerprint code that identifies the name of the variable
 java.lang.String getVariableName()
          Get the name of the variable for use in diagnostics - a lexical QName
 void registerReference(BindingReference ref)
          Method called by a BindingReference to register the variable reference for subsequent fixup.
 void setFingerprint(int fingerprint)
           
 void setIsParameter(boolean b)
           
 void setLineNumber(int lineNumber)
           
 void setRequiredType(SequenceType type)
           
 void setValueExpression(Expression val)
           
 void setVariableName(java.lang.String variableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalVariableDefinition

public GlobalVariableDefinition()
Method Detail

setRequiredType

public void setRequiredType(SequenceType type)

setFingerprint

public void setFingerprint(int fingerprint)

setLineNumber

public void setLineNumber(int lineNumber)

getVariableName

public java.lang.String getVariableName()
Description copied from interface: VariableDeclaration
Get the name of the variable for use in diagnostics - a lexical QName

Specified by:
getVariableName in interface VariableDeclaration

setVariableName

public void setVariableName(java.lang.String variableName)

setValueExpression

public void setValueExpression(Expression val)

setIsParameter

public void setIsParameter(boolean b)

registerReference

public void registerReference(BindingReference ref)
Description copied from interface: VariableDeclaration
Method called by a BindingReference to register the variable reference for subsequent fixup. This method is called by the XPath parser when each reference to the variable is encountered. At some time after parsing and before execution of the expression, the VariableDeclaration is responsible for calling the two methods setStaticType() and fixup() on each BindingReference that has been registered with it.

Specified by:
registerReference in interface VariableDeclaration

getVariableFingerprint

public int getVariableFingerprint()
Description copied from interface: VariableDeclaration
Get the fingerprint code that identifies the name of the variable

Specified by:
getVariableFingerprint in interface VariableDeclaration

compile

public GeneralVariable compile(StaticQueryContext env,
                               int slot)
                        throws XPathException
XPathException