|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.ExprInfo
org.basex.query.var.Var
public final class Var
Variable expression.
Field Summary | |
---|---|
SeqType |
declType
Declared type, null if not specified. |
int |
id
Variable ID. |
QNm |
name
Variable name. |
long |
size
Expected result size. |
int |
slot
Stack slot number. |
Method Summary | |
---|---|
boolean |
adoptCheck(SeqType t,
boolean prom)
Tries to adopt the given type check. |
Expr |
checked(Expr e,
QueryContext ctx,
VarScope scp,
InputInfo ii)
Returns an equivalent to the given expression that checks this variable's type. |
boolean |
checksType()
Determines if this variable checks the type of the expression bound to it. |
Value |
checkType(Value val,
QueryContext ctx,
InputInfo ii)
Checks the type of this value and casts/promotes it when necessary. |
SeqType |
declaredType()
Declared type of this variable. |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
is(Var v)
Checks whether the given variable is identical to this one, i.e. |
void |
plan(FElem plan)
Creates an expression tree. |
boolean |
promotes()
Checks if this variable performs function conversion on its bound values. |
void |
refineType(SeqType t,
QueryContext ctx,
InputInfo ii)
Tries to refine the compile-time type of this variable through the type of the bound expression. |
java.lang.String |
toString()
|
SeqType |
type()
Type of values bound to this variable. |
Methods inherited from class org.basex.data.ExprInfo |
---|
addPlan, addPlan, description, info, planAttr, planElem |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final QNm name
public final int id
public SeqType declType
null
if not specified.
public int slot
public long size
Method Detail |
---|
public SeqType type()
null
) typepublic SeqType declaredType()
null
public void refineType(SeqType t, QueryContext ctx, InputInfo ii) throws QueryException
t
- type of the bound expressionctx
- query contextii
- input info
QueryException
- query exceptionpublic boolean checksType()
true
if the type is checked or promoted, false
otherwisepublic Expr checked(Expr e, QueryContext ctx, VarScope scp, InputInfo ii) throws QueryException
e
- expressionscp
- variable scopectx
- query contextii
- input info
QueryException
- query exceptionpublic Value checkType(Value val, QueryContext ctx, InputInfo ii) throws QueryException
val
- value to be checkedctx
- query contextii
- input info
QueryException
- if the check failedpublic boolean is(Var v)
v
- variable to check
true
, if the IDs are equal, false
otherwisepublic boolean promotes()
public void plan(FElem plan)
ExprInfo
plan
in class ExprInfo
plan
- root elementpublic java.lang.String toString()
toString
in class ExprInfo
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean adoptCheck(SeqType t, boolean prom)
t
- type to checkprom
- if function conversion should be applied
true
if the check could be adopted, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |