Constructor and Description |
---|
ThreadSafeValueExp(Object syncObj,
ValueExp valueExp) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsAssignment()
Returns whether the expression contains any assignments (= or ++ or --).
|
Object |
evaluate(Context context)
Evaluates the expression.
|
Object |
getSyncObject() |
boolean |
isLookupMembers()
Returns whether
evaluate() will return an object that
explicitly shows the values of all members of the expression. |
static ThreadSafeValueExp |
wrap(Object syncObj,
ValueExp valueExp)
Wraps a ValueExp inside a ThreadSafeValueExp.
|
public static ThreadSafeValueExp wrap(Object syncObj, ValueExp valueExp)
public Object evaluate(Context context) throws NumberFormatException, NoSuchVariableException, PlayerFaultException, PlayerDebugException
ValueExp
evaluate
in interface ValueExp
context
- the context in which the expression should be evaluated;
primarily used for looking up variables. For example, when
evaluating the expression "myvar", the context looks at
locals, members of "this", etc.; when evaluating "myfield"
node of the expression "myvar.myfield", the context looks at
members of the variable "myvar".NumberFormatException
NoSuchVariableException
PlayerFaultException
PlayerDebugException
Context.lookup(Object)
public boolean containsAssignment()
ValueExp
containsAssignment
in interface ValueExp
public boolean isLookupMembers()
ValueExp
evaluate()
will return an object that
explicitly shows the values of all members of the expression. For
example, in fdb, if the user writes "print myvar", then isLookupMembers
will be false, and the debugger will show just the value of
myvar
, but not the values of its members; but if the user
writes "print myvar." (with a "." at the end), then the debugger will
show the values of all of the members of myvar
.isLookupMembers
in interface ValueExp
ASTBuilder.ASTBuilder(boolean)
,
ASTBuilder.isIndirectionOperatorAllowed()
public final Object getSyncObject()
Copyright © 2016 The Apache Software Foundation. All rights reserved.