| Modifier and Type | Field and Description |
|---|---|
static FuncType |
ANY_FUN
Any function type.
|
SeqType[] |
args
Argument types.
|
SeqType |
ret
Return type.
|
| Modifier and Type | Method and Description |
|---|---|
static FuncType |
arity(int a)
Getter for function types with a given arity.
|
FItem |
cast(Item it,
QueryContext ctx,
InputInfo ii)
Casts the specified item to the XQuery data type.
|
Item |
cast(java.lang.Object o,
InputInfo ii)
Casts the specified Java object to the XQuery data type.
|
static Type |
find(QNm type)
Finds and returns the specified function type.
|
static FuncType |
get(SeqType ret,
SeqType... args)
Getter for function types.
|
static FuncType |
get(UserFunc f)
Getter for a function's type.
|
int |
id()
Returns a type id to differentiate all types.
|
boolean |
instanceOf(Type t)
Checks if the current type is an instance of the specified type.
|
boolean |
isDate()
Checks if the type refers to a
date or one of its sub-types. |
boolean |
isDuration()
Checks if the type refers to a
xs:duration or one of its sub-types. |
boolean |
isFunction()
Checks if the type refers to a function item.
|
boolean |
isMap()
Checks if the type refers to a map.
|
boolean |
isNode()
Checks if the type refers to a node.
|
boolean |
isNumber()
Checks if the type refers to a number.
|
boolean |
isString()
Checks if the type refers to an
xs:string or one of its sub-types. |
boolean |
isUntyped()
Checks if the type refers to an untyped item.
|
SeqType |
seqType()
Returns the sequence type of this data type.
|
byte[] |
string()
Returns the string representation of this type.
|
java.lang.String |
toString() |
Var[] |
type(Var[] vars)
Sets the types of the given variables.
|
public static final FuncType ANY_FUN
public final SeqType[] args
public final SeqType ret
public final boolean isNode()
Typepublic final boolean isNumber()
Typepublic final SeqType seqType()
Typepublic final boolean isString()
Typexs:string or one of its sub-types.public final boolean isUntyped()
Typepublic final boolean isFunction()
TypeisFunction in interface Typepublic byte[] string()
Typepublic FItem cast(Item it, QueryContext ctx, InputInfo ii) throws QueryException
Typecast in interface Typeit - item to be convertedctx - query contextii - input infoQueryException - query exceptionpublic final Item cast(java.lang.Object o, InputInfo ii)
Typepublic final boolean instanceOf(Type t)
TypeinstanceOf in interface Typet - type to be checkedpublic static FuncType get(SeqType ret, SeqType... args)
ret - return typeargs - argument typespublic static Type find(QNm type)
type - type as stringnullpublic static FuncType arity(int a)
a - number of argumentspublic static FuncType get(UserFunc f)
f - user-defined functionpublic final Var[] type(Var[] vars)
vars - variables to typepublic boolean isDuration()
Typexs:duration or one of its sub-types.isDuration in interface Typepublic boolean isDate()
Typedate or one of its sub-types.public boolean isMap()
Typepublic int id()
Type