public static class BasicLocations.LongFieldLocation extends BasicLocations.MethodHandleFieldLocation implements LocationImpl.InternalLongLocation
LocationImpl.EffectivelyFinalLocation<T extends Location>, LocationImpl.InternalLongLocation, LocationImpl.TypedObjectLocation<T extends Location & ObjectLocation>
getter, setter
Constructor and Description |
---|
LongFieldLocation(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. |
static LongLocation |
create(LocationImpl.InternalLongLocation longLocation,
boolean allowInt) |
java.lang.Object |
get(DynamicObject store,
boolean condition)
Get object value as object at this location in store.
|
long |
getLong(DynamicObject store,
boolean condition) |
long |
getLong(DynamicObject store,
Shape shape) |
java.lang.Class<java.lang.Long> |
getType()
The type of this location.
|
int |
primitiveFieldCount()
Get the number of in-object primitive fields this location requires.
|
void |
setInternal(DynamicObject store,
java.lang.Object value)
Like
Location.set(DynamicObject, Object, Shape) , but does not invalidate final locations. |
void |
setLong(DynamicObject store,
long value) |
void |
setLong(DynamicObject store,
long value,
Shape shape) |
void |
setLong(DynamicObject store,
long value,
Shape oldShape,
Shape newShape) |
void |
setLongInternal(DynamicObject store,
long value) |
equals, getIndex, getWhereString, hashCode
canSet, canStoreFinal, getInternal, isConstant, isFinal, objectArrayCount, objectFieldCount, primitiveArrayCount, set, toString, valueEquals
checkShape, finalLocation, get, incompatibleLocation, set, set
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
get, set, set, set
public LongFieldLocation(int index, java.lang.invoke.MethodHandle getter, java.lang.invoke.MethodHandle setter)
public static LongLocation create(LocationImpl.InternalLongLocation longLocation, boolean allowInt)
public final java.lang.Object get(DynamicObject store, boolean condition)
BaseLocation
BaseLocation.get(DynamicObject, Shape)
instead.get
in interface BaseLocation
get
in class Location
condition
- the result of a shape check or false
BaseLocation.get(DynamicObject, Shape)
public final void setInternal(DynamicObject store, java.lang.Object value) throws IncompatibleLocationException
Location
Location.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 LocationImpl
IncompatibleLocationException
- if value is of non-assignable typepublic final boolean canStore(java.lang.Object value)
Location
true
if the location is compatible with the value.
The value may still be rejected if Location.canSet(DynamicObject, Object)
returns false.canStore
in class LocationImpl
value
- the value in questionpublic final void setLong(DynamicObject store, long value, Shape oldShape, Shape newShape)
setLong
in interface LongLocation
BaseLocation.set(DynamicObject, Object, Shape, Shape)
public long getLong(DynamicObject store, boolean condition)
getLong
in interface LongLocation
BaseLocation.get(DynamicObject, boolean)
public void setLong(DynamicObject store, long value, Shape shape)
setLong
in interface LongLocation
BaseLocation.set(DynamicObject, Object, Shape)
public final void setLong(DynamicObject store, long value) throws FinalLocationException
setLong
in interface LongLocation
FinalLocationException
BaseLocation.set(DynamicObject, Object)
public final void setLongInternal(DynamicObject store, long value)
setLongInternal
in interface LocationImpl.InternalLongLocation
public final long getLong(DynamicObject store, Shape shape)
getLong
in interface LongLocation
BaseLocation.get(DynamicObject, Shape)
public final int primitiveFieldCount()
LocationImpl
primitiveFieldCount
in class LocationImpl
public java.lang.Class<java.lang.Long> getType()
TypedLocation
getType
in interface LongLocation
getType
in interface TypedLocation