public class SpecificFunctionType extends AnyFunctionType
ANY_FUNCTION, SINGLE_FUNCTION
Constructor and Description |
---|
SpecificFunctionType(SequenceType[] argTypes,
SequenceType resultType) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Test whether this function type equals another function type
|
SequenceType[] |
getArgumentTypes()
Get the argument types
|
int |
getArity()
Get the arity (number of arguments) of this function type
|
SequenceType |
getResultType()
Get the result type
|
int |
hashCode()
Returns a hash code value for the object.
|
Expression |
makeFunctionSequenceCoercer(Expression exp,
RoleDiagnostic role)
Create an expression whose effect is to apply function coercion to coerce a function from this type to another type
|
boolean |
matches(Item item,
TypeHierarchy th)
Test whether a given item conforms to this type
|
int |
relationship(FunctionItemType other,
TypeHierarchy th)
Determine the relationship of one function item type to another
|
String |
toString()
Produce a representation of this type name for use in error messages.
|
void |
visitNamedSchemaComponents(SchemaComponentVisitor visitor)
Visit all the schema components used in this ItemType definition
|
getAtomizedItemType, getInstance, getPrimitiveItemType, getPrimitiveType, getUType, isArrayType, isAtomicType, isAtomizable, isMapType, isPlainType
public SpecificFunctionType(SequenceType[] argTypes, SequenceType resultType)
public int getArity()
public SequenceType[] getArgumentTypes()
getArgumentTypes
in interface FunctionItemType
getArgumentTypes
in class AnyFunctionType
public SequenceType getResultType()
getResultType
in interface FunctionItemType
getResultType
in class AnyFunctionType
public String toString()
toString
in class AnyFunctionType
public boolean equals(Object other)
public int hashCode()
public int relationship(FunctionItemType other, TypeHierarchy th)
relationship
in interface FunctionItemType
relationship
in class AnyFunctionType
TypeHierarchy.SUBSUMES
, TypeHierarchy.SAME_TYPE
public boolean matches(Item item, TypeHierarchy th)
matches
in interface ItemType
matches
in class AnyFunctionType
item
- The item to be testedth
- the type hierarchy cachepublic Expression makeFunctionSequenceCoercer(Expression exp, RoleDiagnostic role) throws XPathException
AnyFunctionType
makeFunctionSequenceCoercer
in interface FunctionItemType
makeFunctionSequenceCoercer
in class AnyFunctionType
exp
- the expression that delivers the supplied sequence of function items (the ones in need of coercion)role
- information for use in diagnosticsXPathException
public void visitNamedSchemaComponents(SchemaComponentVisitor visitor) throws XPathException
visitNamedSchemaComponents
in interface ItemType
visitNamedSchemaComponents
in class AnyFunctionType
visitor
- the visitor class to be called when each component is visitedXPathException
- if an error occursCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.