Class GlobalVariable

    • Constructor Detail

      • GlobalVariable

        public GlobalVariable()
    • Method Detail

      • setExecutable

        public void setExecutable​(Executable executable)
      • setHostLanguage

        public void setHostLanguage​(int language)
      • setContainsLocals

        public void setContainsLocals​(SlotManager map)
        The expression that initializes a global variable may itself use local variables. In this case a stack frame needs to be allocated while evaluating the global variable
        Parameters:
        map - The stack frame map for local variables used while evaluating this global variable.
      • isGlobal

        public boolean isGlobal()
        Is this a global variable?
        Specified by:
        isGlobal in interface Binding
        Overrides:
        isGlobal in class GeneralVariable
        Returns:
        true (yes, it is a global variable)
      • lookForCycles

        public void lookForCycles​(java.util.Stack referees)
                           throws StaticError
        Check for cycles in this variable definition
        Parameters:
        referees - the calls leading up to this one; it's an error if this variable is on the stack, because that means it calls itself directly or indirectly. The stack may contain variable definitions (GlobalVariable objects) and user-defined functions (UserFunction objects). It will never contain the same object more than once.
        Throws:
        StaticError
      • processLeavingTail

        public TailCall processLeavingTail​(XPathContext context)
                                    throws XPathException
        Process the variable declaration
        Specified by:
        processLeavingTail in interface TailCallReturner
        Specified by:
        processLeavingTail in class Instruction
        Parameters:
        context - The dynamic context of the transformation, giving access to the current node, the current variables, etc.
        Returns:
        null if the instruction has completed execution; or a TailCall indicating a function call or template call that is delegated to the caller, to be made after the stack has been unwound so as to save stack space.
        Throws:
        XPathException