public class AnyExternalObjectType extends java.lang.Object implements ItemType
ItemType.WithSequenceTypeCache| Modifier and Type | Field and Description |
|---|---|
static AnyExternalObjectType |
THE_INSTANCE |
| Modifier | Constructor and Description |
|---|---|
protected |
AnyExternalObjectType() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
generateJavaScriptItemTypeAcceptor(java.lang.String errorCode,
int targetVersion)
Generate Javascript code to convert a supplied Javascript value to this item type,
if conversion is possible, or throw an error otherwise.
|
java.lang.String |
generateJavaScriptItemTypeTest(ItemType knownToBe,
int targetVersion)
Generate Javascript code to test whether an item conforms to this item type
|
java.lang.String |
getAlphaCode()
Get an alphabetic code representing the type, or at any rate, the nearest built-in type
from which this type is derived.
|
AtomicType |
getAtomizedItemType()
Get the item type of the atomic values that will be produced when an item
of this type is atomized
|
Genre |
getGenre()
Determine the Genre (top-level classification) of this type
|
ItemType |
getPrimitiveItemType()
Get the primitive item type corresponding to this item type.
|
int |
getPrimitiveType()
Get the primitive type corresponding to this item type.
|
UType |
getUType()
Get the corresponding
UType. |
boolean |
isAtomicType()
Determine whether this item type is an atomic type
|
boolean |
isAtomizable(TypeHierarchy th)
Ask whether values of this type are atomizable
|
boolean |
isPlainType()
Determine whether this item type is a plain type (that is, whether it can ONLY match
atomic values)
|
boolean |
matches(Item item,
TypeHierarchy th)
Test whether a given item conforms to this type
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexplainMismatch, isTrueItemType, toExportString, toStringpublic static AnyExternalObjectType THE_INSTANCE
public boolean isAtomicType()
ItemTypeisAtomicType in interface ItemTypepublic boolean matches(Item item, TypeHierarchy th) throws XPathException
ItemTypematches in interface ItemTypeitem - The item to be testedth - The type hierarchy cache. Currently used only when matching function items.XPathExceptionpublic boolean isPlainType()
ItemTypeisPlainType in interface ItemTypepublic int getPrimitiveType()
ItemTypegetPrimitiveType in interface ItemTypepublic java.lang.String getAlphaCode()
getAlphaCode in interface ItemTypepublic java.lang.String generateJavaScriptItemTypeTest(ItemType knownToBe, int targetVersion) throws XPathException
ItemTypegenerateJavaScriptItemTypeTest in interface ItemTypeknownToBe - An item type that the supplied item is known to conform to; the generated code
can assume that the item is an instance of this type.targetVersion - The version of Saxon-JS for which code is being generated. Currently either 1 or 2.XPathException - if JS code cannot be generated for this item type, for example because
the test is schema-aware.public java.lang.String generateJavaScriptItemTypeAcceptor(java.lang.String errorCode,
int targetVersion)
throws XPathException
ItemTypegenerateJavaScriptItemTypeAcceptor in interface ItemTypeerrorCode - the error to be thrown if conversion is not possibletargetVersion - the version of Saxon-JS for which code is being generatedXPathExceptionpublic ItemType getPrimitiveItemType()
ItemTypegetPrimitiveItemType in interface ItemTypepublic UType getUType()
ItemTypeUType. A UType is a union of primitive item
types.public AtomicType getAtomizedItemType()
ItemTypegetAtomizedItemType in interface ItemTypepublic boolean isAtomizable(TypeHierarchy th)
ItemTypeisAtomizable in interface ItemTypeth - the type hierarchy cacheCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.