|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--condor.classad.Expr | +--condor.classad.SelectExpr
An internal (non-leaf) node of an expression tree, representing a selection of component of a record. It has the form from a class ad in the form
<expr> . <identifier>.
Expr
Nested Class Summary |
Nested classes inherited from class condor.classad.Expr |
Expr.Env |
Field Summary | |
Expr |
base
The left argument (base expression) of the selection operator. |
AttrName |
selector
The right argument (identifier) of the selection operator. |
Fields inherited from class condor.classad.Expr |
ABSOLUTE_TIME, AND, ATTRIBUTE, BIT_COMPLEMENT, BITAND, BITOR, BITXOR, BOOLEAN, CALL, COND, dateAndTimeFormat, dateFormat, dblevel, DIFFERENT, DIV, EQUAL, ERROR, GREATER, GREATER_EQ, INTEGER, LEFT_SHIFT, LESS, LESS_EQ, LIST, MAXPREC, MINUS, MOD, NOT, NOT_EQUAL, OP, opName, opNameXML, OR, PLUS, REAL, RECORD, RELATIVE_TIME, RIGHT_SHIFT, SAME, SELECTION, STRING, SUBSCRIPT, TIMES, type, UMINUS, UNDEFINED, UPLUS, URIGHT_SHIFT |
Constructor Summary | |
SelectExpr(Expr base,
AttrName selector)
Create a new SelectExpr corresponding to base.selector . |
|
SelectExpr(Expr base,
String selector)
Create a new SelectExpr corresponding to base.selector . |
Method Summary | |
protected Expr |
eval1(Expr.Env env)
Evaluate this Expr. |
int |
prec()
The precedence of the operator in this expression node. |
static Expr |
select(Expr base,
String[] sel)
A convenience function for creating a SelectExpression corresponding to "base.a.b.c" |
StringBuffer |
toString(StringBuffer sb)
Convert this Expr to a string, appending the result to the end of "sb". |
protected String |
typeName()
The type of the expression. |
Methods inherited from class condor.classad.Expr |
db, db, eval, eval, intValue, isConstant, isTrue, realValue, selectExpr, stringValue, subExpr, toString |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final Expr base
public final AttrName selector
Constructor Detail |
public SelectExpr(Expr base, String selector)
base.selector
.
base
- the left argument (base expression).selector
- the right argument (identifier).public SelectExpr(Expr base, AttrName selector)
base.selector
.
base
- the left argument (base expression).selector
- the right argument (identifier).Method Detail |
public static Expr select(Expr base, String[] sel)
base
- the base Expr.sel
- the sequence of selectors {"a", "b", "c"}
base
if sel
is
empty.protected String typeName()
typeName
in class Expr
public StringBuffer toString(StringBuffer sb)
toString
in class Expr
sb
- a place to put the result.
ClassAdWriter
public int prec()
prec
in class Expr
ClassAdWriter.MINIMAL_PARENTHESES
protected Expr eval1(Expr.Env env)
Expr.eval()
.
The base is evaluated to yield a record or list. In the case of a
record, the selector is used to choose the appropriate component,
and the record is added to the environment. In the case of a list,
the selection is distributed across the list. In all other cases,
the result is the ERROR constant.
eval1
in class Expr
env
- an environment used to evaluate the base. If the base
evaluates to a RecordExpr, it is added to the env (as the first
(innermost) scope) before returning.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |