public static class BasicLocations.ObjectFieldLocation extends BasicLocations.MethodHandleFieldLocation implements ObjectLocation
LocationImpl.EffectivelyFinalLocation<T extends Location>, LocationImpl.InternalLongLocation, LocationImpl.TypedObjectLocation<T extends Location & ObjectLocation>getter, setter| Constructor and Description |
|---|
BasicLocations.ObjectFieldLocation(int index,
java.lang.invoke.MethodHandle getter,
java.lang.invoke.MethodHandle setter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canStore(java.lang.Object value)
Returns
true if the location is compatible with the value. |
java.lang.Object |
get(DynamicObject store,
boolean condition)
Get object value as object at this location in store.
|
java.lang.Class<? extends java.lang.Object> |
getType()
The type of this location.
|
boolean |
isNonNull()
If
true, this location does not accept null values. |
int |
objectFieldCount()
Get the number of in-object
Object fields this location requires. |
void |
setInternal(DynamicObject store,
java.lang.Object value)
Like
Location.set(DynamicObject, Object, Shape), but does not invalidate final locations. |
equals, getIndex, getWhereString, hashCodecanSet, canStoreFinal, getInternal, isConstant, isFinal, objectArrayCount, primitiveArrayCount, primitiveFieldCount, set, toString, valueEqualscheckShape, finalLocation, get, incompatibleLocation, set, setclone, finalize, getClass, notify, notifyAll, wait, wait, waitget, set, set, setpublic BasicLocations.ObjectFieldLocation(int index,
java.lang.invoke.MethodHandle getter,
java.lang.invoke.MethodHandle setter)
public java.lang.Object get(DynamicObject store, boolean condition)
BaseLocationBaseLocation.get(DynamicObject, Shape) instead.get in interface BaseLocationget in class Locationcondition - the result of a shape check or falseBaseLocation.get(DynamicObject, Shape)public final void setInternal(DynamicObject store, java.lang.Object value) throws IncompatibleLocationException
LocationLocation.set(DynamicObject, Object, Shape), but does not invalidate final locations. For
internal use only and subject to change, use DynamicObjectFactory to create objects
with predefined properties.setInternal in class LocationImplIncompatibleLocationException - if value is of non-assignable typepublic boolean canStore(java.lang.Object value)
Locationtrue if the location is compatible with the value.
The value may still be rejected if Location.canSet(DynamicObject, Object) returns false.canStore in class LocationImplvalue - the value in questionpublic java.lang.Class<? extends java.lang.Object> getType()
TypedLocationgetType in interface ObjectLocationgetType in interface TypedLocationpublic boolean isNonNull()
ObjectLocationtrue, this location does not accept null values.isNonNull in interface ObjectLocationpublic int objectFieldCount()
LocationImplObject fields this location requires.objectFieldCount in class LocationImpl