public class ArrayItemType extends AnyFunctionType
| Modifier and Type | Field and Description |
|---|---|
static ArrayItemType |
ANY_ARRAY_TYPE |
ANY_FUNCTION| Constructor and Description |
|---|
ArrayItemType(SequenceType memberType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Test whether this array type equals another array type
|
String |
generateJavaScriptItemTypeTest(ItemType knownToBe)
Generate Javascript code to test whether an item conforms to this item type
|
SequenceType[] |
getArgumentTypes()
Get the argument types of this array, viewed as a function
|
int |
getArity()
Get the arity (number of arguments) of this function type
|
PlainType |
getAtomizedItemType()
Get the item type of the atomic values that will be produced when an item
of this type is atomized
|
SequenceType |
getMemberType()
Get the type of the members of the array
|
SequenceType |
getResultType()
Get the result type of this array, viewed as a function
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
isArrayType()
Ask whether this function item type is an array type.
|
boolean |
isAtomizable()
Ask whether values of this type are atomizable
|
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 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
|
generateJavaScriptItemTypeAcceptor, getInstance, getPrimitiveItemType, getPrimitiveType, getUType, isAtomicType, isPlainTypepublic static final ArrayItemType ANY_ARRAY_TYPE
public ArrayItemType(SequenceType memberType)
public SequenceType getMemberType()
public boolean isMapType()
isMapType in interface FunctionItemTypeisMapType in class AnyFunctionTypepublic boolean isArrayType()
isArrayType in interface FunctionItemTypeisArrayType in class AnyFunctionTypepublic boolean isAtomizable()
isAtomizable in interface ItemTypeisAtomizable in class AnyFunctionTypepublic PlainType getAtomizedItemType()
getAtomizedItemType in interface ItemTypegetAtomizedItemType in class AnyFunctionTypepublic int getArity()
public SequenceType[] getArgumentTypes()
getArgumentTypes in interface FunctionItemTypegetArgumentTypes in class AnyFunctionTypepublic boolean matches(Item item, TypeHierarchy th) throws XPathException
matches in interface ItemTypematches in class AnyFunctionTypeitem - The item to be testedth - XPathExceptionpublic SequenceType getResultType()
getResultType in interface FunctionItemTypegetResultType in class AnyFunctionTypepublic String toString()
toString in class AnyFunctionTypepublic boolean equals(Object other)
public int hashCode()
public int relationship(FunctionItemType other, TypeHierarchy th)
relationship in interface FunctionItemTyperelationship in class AnyFunctionTypeTypeHierarchy.SUBSUMES, TypeHierarchy.SAME_TYPEpublic Expression makeFunctionSequenceCoercer(Expression exp, RoleDiagnostic role) throws XPathException
AnyFunctionTypemakeFunctionSequenceCoercer in interface FunctionItemTypemakeFunctionSequenceCoercer in class AnyFunctionTypeexp - the expression that delivers the supplied sequence of function items (the ones in need of coercion)role - information for use in diagnosticsXPathExceptionpublic void visitNamedSchemaComponents(SchemaComponentVisitor visitor) throws XPathException
visitNamedSchemaComponents in interface ItemTypevisitNamedSchemaComponents in class AnyFunctionTypevisitor - the visitor class to be called when each component is visitedXPathException - if an error occurspublic String generateJavaScriptItemTypeTest(ItemType knownToBe) throws XPathException
generateJavaScriptItemTypeTest in interface ItemTypegenerateJavaScriptItemTypeTest in class AnyFunctionTypeknownToBe - a type that this item is known to conform toXPathException - if JS code cannot be generated for this item type, for example because
the test is schema-aware.Copyright (c) 2004-2015 Saxonica Limited. All rights reserved.