Constructor and Description |
---|
ExpressionContext(ExpressionCache cache) |
Modifier and Type | Method and Description |
---|---|
void |
assign(Object o,
Value v)
Assign the object o, the value v.
|
Context |
createContext(Object o)
Creates a new context object by combining the current one and o.
|
void |
createPseudoVariables(boolean oui)
Enables/disables the creation of variables during lookup calls.
|
int |
getIsolateId()
The worker id to which this context object belongs.
|
String |
getName() |
Session |
getSession()
Returns the session associated with this context, or null.
|
Object |
lookup(Object o)
The Context interface which goes out and gets values from the session
Expressions use this interface as a means of evaluation.
|
Object |
lookupMembers(Object o)
Looks for the members of an object.
|
void |
setIsolateId(int id) |
Value |
toValue()
Converts the context to a Value.
|
Value |
toValue(Object o)
Converts the object to a Value.
|
public ExpressionContext(ExpressionCache cache)
public void setIsolateId(int id)
public String getName()
public void createPseudoVariables(boolean oui)
Context
createPseudoVariables
in interface Context
public Context createContext(Object o)
Context
createContext
in interface Context
o
- any object which may have been returned by this class's lookup() functionpublic void assign(Object o, Value v) throws NoSuchVariableException, PlayerFaultException
Context
assign
in interface Context
o
- a variable to assign to -- this should be some value returned
by an earlier call to lookup().v
- a value, such as a Boolean, Long, String, etc.NoSuchVariableException
PlayerFaultException
public Object lookup(Object o) throws NoSuchVariableException, PlayerFaultException
lookup
in interface Context
o
- the object to look up; most commonly a string representing the name of
a member variable.NoSuchVariableException
PlayerFaultException
public Object lookupMembers(Object o) throws NoSuchVariableException
Context
lookupMembers
in interface Context
o
- A variable whose members we want to look upNoSuchVariableException
Context.lookup(Object)
public Value toValue(Object o)
Context
toValue
in interface Context
o
- Either object that was returned by an earlier call to
lookup()
, or one of the raw types that can be
returned by Value.getValueAsObject()
.null
.Value.getValueAsObject()
public Value toValue()
Context
toValue(Object o)
, except that the object being converted
is the object that was used to initialize this context.public Session getSession()
Context
getSession
in interface Context
public int getIsolateId()
Context
getIsolateId
in interface Context
Copyright © 2016 The Apache Software Foundation. All rights reserved.