Package net.sf.saxon.type

## Interface FunctionItemType

- All Superinterfaces:
    `ItemType`
  All Known Subinterfaces:
    `TupleType`
  All Known Implementing Classes:
    `AnyFunctionType`, `AnyFunctionTypeWithAssertions`, `ArrayItemType`, `MapType`, `SpecificFunctionType`, `TupleItemType`

      public interface FunctionItemType
      extends ItemType

  Higher-order functions in XPath 3.0 introduce a third kind of Item, namely a Function Item. This type is represented here by a placeholder interfaces. The implementation of this type is found only in Saxon-EE

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface net.sf.saxon.type.ItemType

      `ItemType.WithSequenceTypeCache`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `AnnotationList` | `getAnnotationAssertions()` | Get the list of Annotation Assertions associated with this function item type
    `SequenceType[]` | `getArgumentTypes()` | Get the argument types of the function
    `default Genre` | `getGenre()` | Determine the Genre (top-level classification) of this type
    `SequenceType` | `getResultType()` | Get the result type of the function
    `boolean` | `isArrayType()` | Ask whether this function item type is an array type.
    `boolean` | `isMapType()` | Ask whether this function item type is a map type.
    `Expression` | `makeFunctionSequenceCoercer​(Expression exp, RoleDiagnostic role)` | Create an expression whose effect is to apply function coercion to coerce a function to this function type
    `Affinity` | `relationship​(FunctionItemType other, TypeHierarchy th)` | Determine the relationship of one function item type to another.

    - ### Methods inherited from interface net.sf.saxon.type.ItemType

      `explainMismatch, getAtomizedItemType, getBasicAlphaCode, getDefaultPriority, getFullAlphaCode, getNormalizedDefaultPriority, getPrimitiveItemType, getPrimitiveType, getUType, isAtomicType, isAtomizable, isPlainType, isTrueItemType, matches, toExportString, toString`

- - ### Method Detail

    - #### getGenre

          default Genre getGenre()

      Determine the Genre (top-level classification) of this type
      Specified by:
        `getGenre` in interface `ItemType`
      Returns:
        the Genre to which this type belongs, specifically `Genre.FUNCTION`

    - #### getArgumentTypes

          SequenceType[] getArgumentTypes()

      Get the argument types of the function
      Returns:
        the argument types, as an array of SequenceTypes; or null if this is the generic function type function(*)

    - #### getResultType

          SequenceType getResultType()

      Get the result type of the function
      Returns:
        the result type, as a SequenceType

    - #### relationship

          Affinity relationship​(FunctionItemType other,
                                TypeHierarchy th)

      Determine the relationship of one function item type to another. This method is only concerned with the type signatures of the two function item types, and not with their annotation assertions.
      Returns:
        for example `Affinity.SUBSUMES`, `Affinity.SAME_TYPE`

    - #### getAnnotationAssertions

          AnnotationList getAnnotationAssertions()

      Get the list of Annotation Assertions associated with this function item type
      Returns:
        the list of annotation assertions

    - #### makeFunctionSequenceCoercer

          Expression makeFunctionSequenceCoercer​(Expression exp,
                                                 RoleDiagnostic role)
                                          throws XPathException

      Create an expression whose effect is to apply function coercion to coerce a function to this function type
      Parameters:
        `exp` - the expression that delivers the supplied sequence of function items (the ones in need of coercion)
        `role` - information for use in diagnostics
      Returns:
        the coerced function, a function that calls the original function after checking the parameters
      Throws:
        `XPathException`

    - #### isMapType

          boolean isMapType()

      Ask whether this function item type is a map type. In this case function coercion (to the map type) will never succeed.
      Returns:
        true if this FunctionItemType is a map type

    - #### isArrayType

          boolean isArrayType()

      Ask whether this function item type is an array type. In this case function coercion (to the array type) will never succeed.
      Returns:
        true if this FunctionItemType is an array type