## org.exist.xquery.functions.util
Class FunctionFunction

    java.lang.Object
      org.exist.xquery.AbstractExpression
          org.exist.xquery.PathExpr
              org.exist.xquery.Function
                  org.exist.xquery.BasicFunction
                      org.exist.xquery.functions.util.FunctionFunction

All Implemented Interfaces:
  CompiledExpression, CompiledXQuery, Expression

public class FunctionFunction
extends BasicFunction

Author:
  wolf

Field Summary
`static FunctionSignature` `signature`

Fields inherited from class org.exist.xquery.Function
`BUILTIN_FUNCTION_NS`

Fields inherited from interface org.exist.xquery.Expression
`DOT_TEST, EXPRESSION_ID_INVALID, IGNORE_CONTEXT, IN_PREDICATE, IN_UPDATE, IN_WHERE_CLAUSE, NO_CONTEXT_ID, SINGLE_STEP_EXECUTION`

Constructor Summary
`FunctionFunction(XQueryContext context)`

Method Summary
`void` `analyze(AnalyzeContextInfo contextInfo)` Statically analyze the expression and its subexpressions.
`Sequence` `eval(Sequence[] args, Sequence contextSequence)` Process the function.
`void` `resetState()` Called to inform an expression that it should reset to its initial state.

Methods inherited from class org.exist.xquery.BasicFunction
`eval`

Methods inherited from class org.exist.xquery.Function
`createFunction, dump, getArgument, getArgumentCount, getArguments, getASTNode, getCardinality, getDependencies, getName, getParent, getSignature, isCalledAs, returnsType, setArguments, setASTNode, setParent, setPrimaryAxis, toString`

Methods inherited from class org.exist.xquery.PathExpr
`accept, add, add, addPath, addPredicate, dump, getContext, getDocumentSet, getExpression, getLastExpression, getLength, getLiteralValue, getSource, isValid, replaceLastExpression, reset, setContext, setSource`

Methods inherited from class org.exist.xquery.AbstractExpression
`eval, getContextDocSet, getContextId, getExpressionId, setContextDocSet`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.exist.xquery.CompiledXQuery
`eval`

Field Detail

### signature

    public static final FunctionSignature signature

Constructor Detail

### FunctionFunction

    public FunctionFunction(XQueryContext context)

Parameters:
  `context` -

Method Detail

### analyze

    public void analyze(AnalyzeContextInfo contextInfo)
                 throws XPathException

  Description copied from interface: `Expression`
  Statically analyze the expression and its subexpressions. During the static analysis phase, the query engine can detect unknown variables and some type errors.

  Specified by:
    `analyze` in interface `Expression`
  Overrides:
    `analyze` in class `Function`
  Throws:
    `XPathException`

### eval

    public Sequence eval(Sequence[] args,
                         Sequence contextSequence)
                  throws XPathException

  Description copied from class: `BasicFunction`
  Process the function. All arguments are passed in the array args. The number of arguments, their type and cardinality have already been checked to match the function signature.

  Specified by:
    `eval` in class `BasicFunction`
  Parameters:
    `args` -
    `contextSequence` -
  Throws:
    `XPathException`

### resetState

    public void resetState()

  Description copied from interface: `Expression`
  Called to inform an expression that it should reset to its initial state. All cached data in the expression object should be dropped. For example, the document() function calls this method whenever the input document set has changed.

  Specified by:
    `resetState` in interface `Expression`
  Overrides:
    `resetState` in class `PathExpr`

Copyright (C) Wolfgang Meier. All rights reserved.