Package net.sf.saxon.expr.instruct

## Class GlobalParam

- java.lang.Object
- - net.sf.saxon.expr.instruct.Actor
  - - net.sf.saxon.expr.instruct.GlobalVariable
    - - net.sf.saxon.expr.instruct.GlobalParam

- All Implemented Interfaces:
    `javax.xml.transform.SourceLocator`, `Binding`, `ContextOriginator`, `ExpressionOwner`, `Locatable`, `Declaration`, `Location`, `Traceable`, `TraceableComponent`, `org.xml.sax.Locator`

      public final class GlobalParam
      extends GlobalVariable

  The compiled form of a global xsl:param element in an XSLT stylesheet or an external variable declared in the prolog of a Query.
  The xsl:param element in XSLT has mandatory attribute name and optional attribute select. It can also be specified as required="yes" or required="no". In standard XQuery 1.0 external variables are always required, and no default value can be specified; but Saxon provides an extension pragma that allows a query to specify a default. XQuery 1.1 adds standard syntax for defining a default value.

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.expr.instruct.GlobalVariable

      `references`

    - ### Fields inherited from class net.sf.saxon.expr.instruct.Actor

      `body`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `GlobalParam()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `GroundedValue` | `evaluateVariable​(XPathContext context)` | Evaluate the variable
    `GroundedValue` | `evaluateVariable​(XPathContext context, Component target)` | Evaluate the variable
    `protected java.lang.String` | `getFlags()` |
    `java.lang.String` | `getTracingTag()` | Get a string used to identify this kind of component when used in tracing output
    `boolean` | `isImplicitlyRequiredParam()` | Ask whether this variable represents a required parameter
    `void` | `setImplicitlyRequiredParam​(boolean requiredParam)` | Indicate that this parameter is implicitly required, because the default value does not match the type

    - ### Methods inherited from class net.sf.saxon.expr.instruct.GlobalVariable

      `actuallyEvaluate, addReference, compile, export, gatherProperties, getBinderySlotNumber, getDescription, getHostLanguage, getIntegerBoundsForVariable, getLocalSlotNumber, getObjectName, getOriginalVariable, getProperties, getProperty, getRequiredType, getSelectValue, getSymbolicName, getUltimateOriginalVariable, getVariableQName, init, isAssignable, isGlobal, isIndexedVariable, isPrivate, isRequiredParam, isStatic, isUnused, iterateReferences, lookForCycles, registerReference, setAssignable, setBinderySlotNumber, setContainsLocals, setDependencies, setIndexedVariable, setOriginalVariable, setPrivate, setRequiredParam, setRequiredType, setStatic, setUnused, setVariableQName, typeCheck`

    - ### Methods inherited from class net.sf.saxon.expr.instruct.Actor

      `allocateAllBindingSlots, allocateBindingSlotsRecursive, getBody, getChildExpression, getColumnNumber, getComponentName, getDeclaredVisibility, getDeclaringComponent, getLineNumber, getLocation, getPackageData, getPublicId, getRetainedStaticContext, getStackFrameMap, getSystemId, isExportable, makeDeclaringComponent, obtainDeclaringComponent, saveLocation, setBody, setChildExpression, setColumnNumber, setDeclaredVisibility, setDeclaringComponent, setLineNumber, setPackageData, setRetainedStaticContext, setStackFrameMap, setSystemId`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.expr.Locatable

      `getLocation`

    - ### Methods inherited from interface net.sf.saxon.trace.TraceableComponent

      `getBody, setBody`

- - ### Constructor Detail

    - #### GlobalParam

          public GlobalParam()

  - ### Method Detail

    - #### setImplicitlyRequiredParam

          public void setImplicitlyRequiredParam​(boolean requiredParam)

      Indicate that this parameter is implicitly required, because the default value does not match the type
      Parameters:
        `requiredParam` - true if this is a required parameter

    - #### isImplicitlyRequiredParam

          public boolean isImplicitlyRequiredParam()

      Ask whether this variable represents a required parameter
      Returns:
        true if this variable represents a required parameter

    - #### getTracingTag

          public java.lang.String getTracingTag()

      Description copied from class: `Actor`
      Get a string used to identify this kind of component when used in tracing output
      Specified by:
        `getTracingTag` in interface `TraceableComponent`
      Overrides:
        `getTracingTag` in class `GlobalVariable`
      Returns:
        an identifying string

    - #### evaluateVariable

          public GroundedValue evaluateVariable​(XPathContext context,
                                                Component target)
                                         throws XPathException

      Evaluate the variable
      Overrides:
        `evaluateVariable` in class `GlobalVariable`
      Throws:
        `XPathException`

    - #### evaluateVariable

          public GroundedValue evaluateVariable​(XPathContext context)
                                         throws XPathException

      Evaluate the variable
      Specified by:
        `evaluateVariable` in interface `Binding`
      Overrides:
        `evaluateVariable` in class `GlobalVariable`
      Parameters:
        `context` - the XPath dynamic evaluation context
      Returns:
        the result of evaluating the variable
      Throws:
        `XPathException` - if an error occurs while evaluating the variable

    - #### getFlags

          protected java.lang.String getFlags()

      Overrides:
        `getFlags` in class `GlobalVariable`