## net.sf.saxon.functions
Class SystemFunction

    java.lang.Object
      |
      +--net.sf.saxon.expr.ComputedExpression
            |
            +--net.sf.saxon.expr.FunctionCall
                  |
                  +--net.sf.saxon.functions.SystemFunction

All Implemented Interfaces:
  Container, Expression, InstructionInfoProvider, java.io.Serializable, javax.xml.transform.SourceLocator

Direct Known Subclasses:
  Adjust, Aggregate, Available, BaseURI, BooleanFn, CollatingFunction, Collection, CompileTimeFunction, Component, Concat, Current, CurrentDateTime, CurrentGroup, DateTimeConstructor, Doc, Document, Error, EscapeURI, Evaluate, Existence, ForceCase, FormatDate, FormatNumber, FormatNumber2, Id, Idref, InScopeNamespaces, Insert, Key, Lang, Last, Matches, NamePart, NamespaceForPrefix, NormalizeSpace, NumberFn, Parse, Position, QNameFn, RegexGroup, Remove, Replace, ResolveQName, ResolveURI, Root, Rounding, Serialize, StringFn, StringJoin, StringLength, Subsequence, Substring, SystemProperty, Tokenize, Trace, Translate, TreatFn, Unicode, UnparsedEntity, UnparsedText

public abstract class SystemFunction
extends FunctionCall

Abstract superclass for system-defined and user-defined functions

See Also:
  Serialized Form

Field Summary
`protected int` `operation`

Fields inherited from class net.sf.saxon.expr.FunctionCall
`argument`

Fields inherited from class net.sf.saxon.expr.ComputedExpression
`locationId, staticProperties`

Fields inherited from interface net.sf.saxon.expr.Expression
`EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD`

Constructor Summary
`SystemFunction()`

Method Summary
`protected void` `addContextDocumentArgument(int pos, java.lang.String augmentedName)` Add an implicit argument referring to the context document.
`void` `checkArguments(StaticContext env)` Method called during static type checking
`int` `computeCardinality()` Determine the cardinality of the function.
`void` `display(int level, NamePool pool, java.io.PrintStream out)` Diagnostic print of expression structure
`protected StandardFunction.Entry` `getDetails()` Get the details
`ItemType` `getItemType()` Determine the item type of the value returned by the function
`protected SequenceType` `getRequiredType(int arg)` Get the required type of the nth argument
`static void` `main(java.lang.String[] args)` The main() method of this class is not intended to be called, it merely tells the code inspection tools in IDEA that the constructors of each function class are actual entry points
`static FunctionCall` `makeSystemFunction(java.lang.String name, NamePool pool)` Make a system function (one in the standard function namespace).
`void` `setDetails(StandardFunction.Entry entry)` Set the details of this type of function
`protected void` `useContextItemAsDefault()` Set "." as the default value for the first and only argument.

Methods inherited from class net.sf.saxon.expr.FunctionCall
`analyze, checkArgumentCount, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, preEvaluate, promote, setArguments, setFunctionNameCode, simplify, simplifyArguments`

Methods inherited from class net.sf.saxon.expr.ComputedExpression

`adoptChildExpression, computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getParentExpression, getPublicId, getSpecialProperties, getSystemId, iterate, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, typeError`

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

Field Detail

### operation

    protected int operation

Constructor Detail

### SystemFunction

    public SystemFunction()

Method Detail

### makeSystemFunction

    public static FunctionCall makeSystemFunction(java.lang.String name,
                                                  NamePool pool)

  Make a system function (one in the standard function namespace).

  Parameters:
    `name` - The local name of the function. It may also be a lexical QName for a recognized built-in function, e.g. saxon:evaluate, in which case the prefix is hard-coded.
  Returns:
    a FunctionCall that implements this function, if it exists, or null if the function is unknown.

### setDetails

    public void setDetails(StandardFunction.Entry entry)

  Set the details of this type of function

### getDetails

    protected StandardFunction.Entry getDetails()

  Get the details

### checkArguments

    public void checkArguments(StaticContext env)
                        throws XPathException

  Method called during static type checking

  Specified by:
    `checkArguments` in class `FunctionCall`
    `XPathException`

### getRequiredType

    protected SequenceType getRequiredType(int arg)

  Get the required type of the nth argument

### getItemType

    public ItemType getItemType()

  Determine the item type of the value returned by the function

  Returns:
    a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known at compile time)

### computeCardinality

    public int computeCardinality()

  Determine the cardinality of the function.

  Specified by:
    `computeCardinality` in class `ComputedExpression`

### useContextItemAsDefault

    protected final void useContextItemAsDefault()

  Set "." as the default value for the first and only argument. Called from subclasses.

### addContextDocumentArgument

    protected final void addContextDocumentArgument(int pos,
                                                    java.lang.String augmentedName)
                                             throws StaticError

  Add an implicit argument referring to the context document. Called by functions such as id() and key() that take the context document as an implicit argument

    `StaticError`

### display

    public void display(int level,
                        NamePool pool,
                        java.io.PrintStream out)

  Diagnostic print of expression structure

  Specified by:
    `display` in interface `Expression`
  Overrides:
    `display` in class `FunctionCall`
  Parameters:
    `level` - indentation level for this expression
    `pool` - NamePool used to expand any names appearing in the expression
    `out` - Output destination

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  The main() method of this class is not intended to be called, it merely tells the code inspection tools in IDEA that the constructors of each function class are actual entry points

    `java.lang.Exception`