net.sf.saxon.functions

## Class StandardFunction.Entry

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

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    StandardFunction

      public static class StandardFunction.Entry
      extends Object
      implements Serializable

  An entry in the table describing the properties of a function
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `applicability` Flags indicating which host languages the function is applicable to
    `SequenceType[]` | `argumentTypes` An array holding the types of the arguments to the function
    `int` | `cardinality` The cardinality of the result of the function
    `Class` | `implementationClass` The class containing the implementation of this function (always a subclass of SystemFunction)
    `ItemType` | `itemType` The item type of the result of the function
    `int` | `maxArguments` The maximum number of arguments permitted
    `int` | `minArguments` The minimum number of arguments required
    `String` | `name` The name of the function: a local name in the case of functions in the standard library, or a name with the conventional prefix "saxon:" in the case of Saxon extension functions
    `int` | `opcode` Some classes support more than one function.
    `int` | `properties` Any additional properties.
    `Sequence[]` | `resultIfEmpty` An array holding, for each declared argument, the value that is to be returned if an empty sequence as the value of this argument allows the result to be determined irrespective of the values of the other arguments; null if there is no such calculation possible
    `int[]` | `syntacticContext` The syntactic context of each argument for the purposes of streamability analysis

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardFunction.Entry()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `StandardFunction.Entry` | `arg(int a, ItemType type, int options, Sequence resultIfEmpty)` Add information to a function entry about the argument types of the function

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

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

- - ### Field Detail

    - #### name

          public String name

      The name of the function: a local name in the case of functions in the standard library, or a name with the conventional prefix "saxon:" in the case of Saxon extension functions

    - #### implementationClass

          public Class implementationClass

      The class containing the implementation of this function (always a subclass of SystemFunction)

    - #### opcode

          public int opcode

      Some classes support more than one function. In these cases the particular function is defined by an integer opcode, whose meaning is local to the implementation class.

    - #### minArguments

          public int minArguments

      The minimum number of arguments required

    - #### maxArguments

          public int maxArguments

      The maximum number of arguments permitted

    - #### itemType

          public ItemType itemType

      The item type of the result of the function

    - #### cardinality

          public int cardinality

      The cardinality of the result of the function

    - #### applicability

          public int applicability

      Flags indicating which host languages the function is applicable to

    - #### syntacticContext

          public int[] syntacticContext

      The syntactic context of each argument for the purposes of streamability analysis

    - #### argumentTypes

          public SequenceType[] argumentTypes

      An array holding the types of the arguments to the function

    - #### resultIfEmpty

          public Sequence[] resultIfEmpty

      An array holding, for each declared argument, the value that is to be returned if an empty sequence as the value of this argument allows the result to be determined irrespective of the values of the other arguments; null if there is no such calculation possible

    - #### properties

          public int properties

      Any additional properties. Currently one bit is defined: SAME_AS_FIRST_ARGUMENT indicates that the result type is the same as the type of the first argument

  - ### Constructor Detail

    - #### StandardFunction.Entry

          public StandardFunction.Entry()

  - ### Method Detail

    - #### arg

          public StandardFunction.Entry arg(int a,
                                   ItemType type,
                                   int options,
                                   Sequence resultIfEmpty)

      Add information to a function entry about the argument types of the function
      Parameters:
        `a` - the position of the argument, counting from zero
        `type` - the item type of the argument
        `options` - the cardinality and usage of the argument
        `resultIfEmpty` - the value returned by the function if an empty sequence appears as the value of this argument, in the case when this result is unaffected by any other arguments. Supply null if this does not apply.
      Returns:
        this entry (to allow chaining)

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