|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.type.AnyFunctionType com.saxonica.functions.hof.FunctionType
public class FunctionType
An instance of this class represents a specific function item type, for example function(xs:int) as xs:boolean
Field Summary |
---|
Fields inherited from class net.sf.saxon.type.AnyFunctionType |
---|
ANY_FUNCTION, SINGLE_FUNCTION |
Constructor Summary | |
---|---|
FunctionType(SequenceType[] argTypes,
SequenceType resultType)
|
Method Summary | |
---|---|
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 |
ItemType |
getSuperType(TypeHierarchy th)
Get the type from which this item type is derived by restriction. |
int |
hashCode()
Returns a hash code value for the object. |
Expression |
makeFunctionSequenceCoercer(Expression exp,
RoleLocator role,
TypeCheckerEnvironment visitor)
Create an expression whose effect is to apply function coercion to coerce a function from this type to another type |
boolean |
matchesItem(Item item,
boolean allowURIPromotion,
Configuration config)
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. |
String |
toString(NamePool pool)
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 |
Methods inherited from class net.sf.saxon.type.AnyFunctionType |
---|
getAtomizedItemType, getDefaultPriority, getInstance, getPrimitiveItemType, getPrimitiveType, isAtomicType, isAtomizable, isMapType, isPlainType, matches |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FunctionType(SequenceType[] argTypes, SequenceType resultType)
Method Detail |
---|
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 boolean matchesItem(Item item, boolean allowURIPromotion, Configuration config)
matchesItem
in interface ItemType
matchesItem
in class AnyFunctionType
item
- The item to be testedallowURIPromotion
- config
-
public ItemType getSuperType(TypeHierarchy th)
getSuperType
in interface ItemType
getSuperType
in class AnyFunctionType
th
- the type hierarchy cache
public String toString(NamePool pool)
toString
in interface ItemType
toString
in class AnyFunctionType
pool
- the name pool
public String toString()
toString
in class AnyFunctionType
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int relationship(FunctionItemType other, TypeHierarchy th)
relationship
in interface FunctionItemType
relationship
in class AnyFunctionType
TypeHierarchy.SUBSUMES
, TypeHierarchy.SAME_TYPE
public Expression makeFunctionSequenceCoercer(Expression exp, RoleLocator role, TypeCheckerEnvironment visitor) 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 diagnosticsvisitor
- the expression visitor, supplies context information
XPathException
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 visited
XPathException
- if an error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |