public abstract static class Locations.ValueLocation extends LocationImpl
LocationImpl.InternalLongLocation, LocationImpl.LocationVisitor| Constructor and Description |
|---|
ValueLocation(Object value) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(LocationImpl.LocationVisitor locationVisitor)
Accept a visitor for location allocation for this and every nested location.
|
boolean |
canStore(Object val)
Returns
true if the location is compatible with the type of the value. |
boolean |
equals(Object obj)
Abstract to force overriding.
|
Object |
get(DynamicObject store,
boolean condition)
Get object value as object at this location in store.
|
int |
hashCode()
Abstract to force overriding.
|
boolean |
isValue()
Returns
true if this is a value location. |
void |
set(DynamicObject store,
Object value,
Shape shape)
Set object value at this location in store.
|
void |
setInternal(DynamicObject store,
Object value)
Like
Location.set(DynamicObject, Object, Shape), but does not invalidate final locations. |
String |
toString() |
canSet, canSet, canStoreFinal, getInternal, getWhereString, isConstant, isFinal, objectArrayCount, objectFieldCount, primitiveArrayCount, primitiveFieldCount, valueEqualscheckShape, finalLocation, get, get, getFinalAssumption, incompatibleLocation, isAssumedFinal, isDeclared, set, setpublic ValueLocation(Object value)
public int hashCode()
LocationhashCode in class LocationImplpublic boolean equals(Object obj)
Locationequals in class LocationImplpublic final Object get(DynamicObject store, boolean condition)
LocationLocation.get(DynamicObject, Shape) instead.get in class Locationcondition - the result of a shape check or falseLocation.get(DynamicObject, Shape)public final void set(DynamicObject store, Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException
Locationset in class LocationImplshape - the current shape of the storage objectIncompatibleLocationException - for storage type invalidationsFinalLocationException - for effectively final fieldspublic boolean canStore(Object val)
Locationtrue if the location is compatible with the type of the value.
The actual value may still be rejected if Location.canSet(DynamicObject, Object) returns
false.canStore in class LocationImplval - the value in questionpublic final void setInternal(DynamicObject store, 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 String toString()
toString in class LocationImplpublic final void accept(LocationImpl.LocationVisitor locationVisitor)
LocationImplaccept in class LocationImpllocationVisitor - visitor to be notified of every allocated slot in use by this locationpublic final boolean isValue()
Locationtrue if this is a value location.isValue in class LocationLocation.isConstant(),
Location.isDeclared()