Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.type
Interface FunctionItemType

All Superinterfaces:
  ItemType, Serializable

All Known Implementing Classes:
  AnyFunctionType, FunctionType, MapType

    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

Method Summary
`SequenceType[]` | `getArgumentTypes()` Get the argument types of the function
`SequenceType` | `getResultType()` Get the result type of the function
`boolean` | `isMapType()` Ask whether this function item type is a map type.
`Expression` | `makeFunctionSequenceCoercer(Expression exp, RoleLocator role, TypeCheckerEnvironment visitor)` Create an expression whose effect is to apply function coercion to coerce a function to this function type
`int` | `relationship(FunctionItemType other, TypeHierarchy th)` Determine the relationship of one function item type to another

Methods inherited from interface net.sf.saxon.type.ItemType
`getAtomizedItemType, getDefaultPriority, getPrimitiveItemType, getPrimitiveType, getSuperType, isAtomicType, isAtomizable, isPlainType, matches, matchesItem, toString, visitNamedSchemaComponents`

Method Detail

### 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

    int relationship(FunctionItemType other,
                     TypeHierarchy th)

  Determine the relationship of one function item type to another

  Returns:
    for example `TypeHierarchy.SUBSUMES`, `TypeHierarchy.SAME_TYPE`

### makeFunctionSequenceCoercer

    Expression makeFunctionSequenceCoercer(Expression exp,
                                           RoleLocator role,
                                           TypeCheckerEnvironment visitor)
                                           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
    `visitor` - the expression visitor, supplies context information
  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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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