Package net.sf.saxon.type
Interface FunctionItemType
- All Superinterfaces:
ItemType
- All Known Subinterfaces:
TupleType
- All Known Implementing Classes:
AnyFunctionType
,AnyFunctionTypeWithAssertions
,ArrayItemType
,MapType
,SpecificFunctionType
,TupleItemType
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
Modifier and TypeMethodDescriptionGet the list of Annotation Assertions associated with this function item typeGet the argument types of the functiondefault Genre
getGenre()
Determine the Genre (top-level classification) of this typeGet the result type of the functionboolean
Ask whether this function item type is an array type.boolean
Ask whether this function item type is a map type.makeFunctionSequenceCoercer
(Expression exp, RoleDiagnostic role) Create an expression whose effect is to apply function coercion to coerce a function to this function typerelationship
(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 Details
-
getGenre
Determine the Genre (top-level classification) of this type- Specified by:
getGenre
in interfaceItemType
- 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
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
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
-