public class InstanceFieldValue extends AbstractValue
Value that reflects a non-static field in some Java object.| Modifier and Type | Field and Description |
|---|---|
protected Field |
field |
protected Object |
object |
| Constructor and Description |
|---|
InstanceFieldValue(Object object,
Field field)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get(ParseSession session)
Evaluate this value within the given context.
|
Class<?> |
getType(ParseSession session)
Get the type of this value without evaluating it.
|
void |
set(ParseSession session,
Value value)
Make assignment to this instance.
|
add, and, asLValue, checkBoolean, checkIntegral, checkNotNull, checkNumeric, checkType, compare, divide, invert, lshift, mod, multiply, negate, or, rshift, subtract, urshift, xor, xxcrementpublic InstanceFieldValue(Object object, Field field)
object - object containing fieldfield - field to accessIllegalArgumentException - if object is nullIllegalArgumentException - if field is nullIllegalArgumentException - if field is staticpublic Object get(ParseSession session)
ValueNormally this method should only be invoked once, and the result cached, because evaluation could have side effects.
session - parse sessionpublic void set(ParseSession session, Value value)
LValuesession - parse sessionvalue - new value for this instancepublic Class<?> getType(ParseSession session)
Value
This should perform a best-effort attempt to determine the type, but should not invoke get().
If the type is unknown, Object.class should be returned.
getType in interface ValuegetType in class AbstractValuesession - parse sessionCopyright © 2017. All rights reserved.