|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.value.type.FuncType
public class FuncType
XQuery 3.0 function data types.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.basex.query.value.type.Type |
---|
Type.ID |
Field Summary | |
---|---|
Ann |
ann
Annotations. |
static FuncType |
ANY_FUN
Any function type. |
SeqType[] |
args
Argument types. |
SeqType |
type
Return type. |
Method Summary | |
---|---|
Expr[] |
args(Var[] vs,
QueryContext ctx,
VarScope scp,
InputInfo ii)
Creates variables with types corresponding to this type's arguments. |
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,
QueryContext ctx,
InputInfo ii)
Casts the specified Java object to the XQuery data type. |
Item |
castString(java.lang.String s,
QueryContext ctx,
InputInfo ii)
Casts the specified string to the XQuery data type. |
boolean |
eq(Type t)
Checks if this type is equal to the given one. |
static Type |
find(QNm type)
Finds and returns the specified function type. |
static FuncType |
get(Ann a,
SeqType ret,
SeqType... args)
Getter for function types. |
static FuncType |
get(Ann an,
Var[] args,
SeqType ret)
Getter for a function's type. |
static FuncType |
get(SeqType ret,
SeqType... args)
Getter for function types without annotations. |
Type.ID |
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. |
Type |
intersect(Type t)
Computes the intersection between this type and the given one, i.e. |
boolean |
isNode()
Checks if the type refers to a node. |
boolean |
isNumber()
Checks if the type refers to a number. |
boolean |
isNumberOrUntyped()
Checks if the type refers to a number or an untyped item. |
boolean |
isStringOrUntyped()
Checks if the type refers to a number or a string. |
boolean |
isUntyped()
Checks if the type refers to an untyped item. |
boolean |
nsSensitive()
Checks if the type is namespace-sensitive. |
SeqType |
seqType()
Returns the sequence type of this data type. |
byte[] |
string()
Returns the string representation of this type. |
java.lang.String |
toString()
|
Type |
union(Type t)
Computes the union between this type and the given one, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final FuncType ANY_FUN
public final Ann ann
public final SeqType[] args
public final SeqType type
Method Detail |
---|
public final boolean isNode()
Type
isNode
in interface Type
public final boolean isNumber()
Type
isNumber
in interface Type
public final boolean isUntyped()
Type
isUntyped
in interface Type
public final boolean isNumberOrUntyped()
Type
isNumberOrUntyped
in interface Type
public final boolean isStringOrUntyped()
Type
isStringOrUntyped
in interface Type
public final SeqType seqType()
Type
seqType
in interface Type
public byte[] string()
Type
string
in interface Type
public FItem cast(Item it, QueryContext ctx, InputInfo ii) throws QueryException
Type
cast
in interface Type
it
- item to be convertedctx
- query contextii
- input info
QueryException
- query exceptionpublic final Item cast(java.lang.Object o, QueryContext ctx, InputInfo ii)
Type
cast
in interface Type
o
- Java objectctx
- TODOii
- input info
public final Item castString(java.lang.String s, QueryContext ctx, InputInfo ii)
Type
castString
in interface Type
s
- string objectctx
- TODOii
- input info
public boolean eq(Type t)
Type
eq
in interface Type
t
- other type
true
if both types are equal, false
otherwisepublic boolean instanceOf(Type t)
Type
instanceOf
in interface Type
t
- type to be checked
public Type union(Type t)
Type
union
in interface Type
t
- other type
public Type intersect(Type t)
Type
null
is
returned.
intersect
in interface Type
t
- other type
null
public static FuncType get(Ann a, SeqType ret, SeqType... args)
a
- annotationsret
- return typeargs
- argument types
public static FuncType get(SeqType ret, SeqType... args)
ret
- return typeargs
- argument types
public static Type find(QNm type)
type
- type as string
null
public static FuncType arity(int a)
a
- number of arguments
public static FuncType get(Ann an, Var[] args, SeqType ret)
an
- annotationsargs
- formal parametersret
- return type
public Expr[] args(Var[] vs, QueryContext ctx, VarScope scp, InputInfo ii)
vs
- array in which to write the variablesctx
- query contextscp
- variable scopeii
- input info
public Type.ID id()
Type
id
in interface Type
public java.lang.String toString()
toString
in interface Type
toString
in class java.lang.Object
public boolean nsSensitive()
Type
nsSensitive
in interface Type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |