net.sf.saxon.functions

## Class StandardFunction

- java.lang.Object
- - net.sf.saxon.functions.StandardFunction

-     public abstract class StandardFunction
      extends Object

  This class contains static data tables defining the properties of standard functions. "Standard functions" here means the XPath 2.0 functions, the XSLT 2.0 functions, and a few selected extension functions which need special recognition.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StandardFunction.Entry` An entry in the table describing the properties of a function

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `AS_ARG0`
    `static int` | `AS_PRIM_ARG0`
    `static int` | `BASE`
    `static int` | `CORE` Categories of functions, bit significant
    `static int` | `DCOLL`
    `static int` | `DEPENDS_ON_STATIC_CONTEXT`
    `static Sequence` | `EMPTY`
    `static int` | `FOCUS`
    `static int` | `GIVE`
    `static int` | `INTERNAL`
    `static int` | `LOOK` Classification of function arguments for serialization purposes; note that values must not conflict with bit settings used for cardinalities
    `static int` | `NS`
    `static int` | `ONE` Local names used for cardinality values
    `static int` | `OPT`
    `static int` | `PLUS`
    `static int` | `STAR`
    `static int` | `TAKE`
    `static int` | `USE_WHEN`
    `static int` | `WALK`
    `static int` | `XPATH30`
    `static int` | `XQUPDATE`
    `static int` | `XSLT`
    `static int` | `XSLT30`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static StandardFunction.Entry` | `getFunction(String name, int arity)` Get the table entry for the function with a given name
    `static StandardFunction.Entry` | `makeEntry(String name, Class implementationClass, int opcode, int minArguments, int maxArguments, ItemType itemType, int cardinality, int applicability, int properties)` Make a table entry describing the signature of a function, with a reference to the implementation class.
    `static StandardFunction.Entry` | `register(String name, Class implementationClass, int opcode, int minArguments, int maxArguments, ItemType itemType, int cardinality, int applicability, int properties)` Register a system function in the table of function details.

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

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

- - ### Field Detail

    - #### EMPTY

          public static Sequence EMPTY

    - #### CORE

          public static final int CORE

      Categories of functions, bit significant
      See Also:
        Constant Field Values

    - #### XSLT

          public static final int XSLT

      See Also:
        Constant Field Values

    - #### USE_WHEN

          public static final int USE_WHEN

      See Also:
        Constant Field Values

    - #### XQUPDATE

          public static final int XQUPDATE

      See Also:
        Constant Field Values

    - #### XPATH30

          public static final int XPATH30

      See Also:
        Constant Field Values

    - #### INTERNAL

          public static final int INTERNAL

      See Also:
        Constant Field Values

    - #### XSLT30

          public static final int XSLT30

      See Also:
        Constant Field Values

    - #### ONE

          public static final int ONE

      Local names used for cardinality values
      See Also:
        Constant Field Values

    - #### OPT

          public static final int OPT

      See Also:
        Constant Field Values

    - #### STAR

          public static final int STAR

      See Also:
        Constant Field Values

    - #### PLUS

          public static final int PLUS

      See Also:
        Constant Field Values

    - #### LOOK

          public static final int LOOK

      Classification of function arguments for serialization purposes; note that values must not conflict with bit settings used for cardinalities
      See Also:
        Constant Field Values

    - #### TAKE

          public static final int TAKE

      See Also:
        Constant Field Values

    - #### GIVE

          public static final int GIVE

      See Also:
        Constant Field Values

    - #### WALK

          public static final int WALK

      See Also:
        Constant Field Values

    - #### AS_ARG0

          public static final int AS_ARG0

      See Also:
        Constant Field Values

    - #### AS_PRIM_ARG0

          public static final int AS_PRIM_ARG0

      See Also:
        Constant Field Values

    - #### FOCUS

          public static final int FOCUS

      See Also:
        Constant Field Values

    - #### BASE

          public static final int BASE

      See Also:
        Constant Field Values

    - #### NS

          public static final int NS

      See Also:
        Constant Field Values

    - #### DCOLL

          public static final int DCOLL

      See Also:
        Constant Field Values

    - #### DEPENDS_ON_STATIC_CONTEXT

          public static final int DEPENDS_ON_STATIC_CONTEXT

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### register

          public static StandardFunction.Entry register(String name,
                                        Class implementationClass,
                                        int opcode,
                                        int minArguments,
                                        int maxArguments,
                                        ItemType itemType,
                                        int cardinality,
                                        int applicability,
                                        int properties)

      Register a system function in the table of function details.
      Parameters:
        `name` - the function name
        `implementationClass` - the class used to implement the function
        `opcode` - identifies the function when a single class implements several functions
        `minArguments` - the minimum number of arguments required
        `maxArguments` - the maximum number of arguments allowed
        `itemType` - the item type of the result of the function
        `cardinality` - the cardinality of the result of the function
        `applicability` - the host languages (and versions thereof) in which this function is available
        `properties` -
      Returns:
        the entry describing the function. The entry is incomplete, it does not yet contain information about the function arguments.

    - #### makeEntry

          public static StandardFunction.Entry makeEntry(String name,
                                         Class implementationClass,
                                         int opcode,
                                         int minArguments,
                                         int maxArguments,
                                         ItemType itemType,
                                         int cardinality,
                                         int applicability,
                                         int properties)

      Make a table entry describing the signature of a function, with a reference to the implementation class.
      Parameters:
        `name` - the function name
        `implementationClass` - the class used to implement the function
        `opcode` - identifies the function when a single class implements several functions
        `minArguments` - the minimum number of arguments required
        `maxArguments` - the maximum number of arguments allowed
        `itemType` - the item type of the result of the function
        `cardinality` - the cardinality of the result of the function
        `applicability` - the host languages (and versions of) in which this function is available
      Returns:
        the entry describing the function. The entry is incomplete, it does not yet contain information about the function arguments.

    - #### getFunction

          public static StandardFunction.Entry getFunction(String name,
                                           int arity)

      Get the table entry for the function with a given name
      Parameters:
        `name` - the name of the function. This may be an unprefixed local-name for functions in the system namespace, or may use the conventional prefix "saxon:" in the case of Saxon extension functions that are specially recognized
        `arity` - the number of arguments of the function, or -1 if any arity will do
      Returns:
        if the function name is known, an Entry containing information about the function. Otherwise, null

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.