public abstract class LocationImpl extends Location
| Modifier and Type | Class and Description |
|---|---|
static interface |
LocationImpl.EffectivelyFinalLocation<T extends Location> |
static interface |
LocationImpl.InternalLongLocation |
static interface |
LocationImpl.TypedObjectLocation<T extends Location & ObjectLocation> |
| Constructor and Description |
|---|
LocationImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSet(DynamicObject store,
java.lang.Object value)
Returns
true if the location can be set to the value. |
boolean |
canStore(java.lang.Object value)
Returns
true if the location is compatible with the value. |
protected boolean |
canStoreFinal(DynamicObject store,
java.lang.Object value) |
boolean |
equals(java.lang.Object obj) |
protected java.lang.Object |
getInternal(DynamicObject store) |
protected java.lang.String |
getWhereString() |
int |
hashCode() |
boolean |
isConstant()
Returns
true if this is an immutable constant location. |
boolean |
isFinal()
Returns
true if this is a final location, i.e. |
int |
objectArrayCount()
Get the number of object array elements this location requires.
|
int |
objectFieldCount()
Get the number of in-object
Object fields this location requires. |
int |
primitiveArrayCount()
Get the number of primitive array elements this location requires.
|
int |
primitiveFieldCount()
Get the number of in-object primitive fields this location requires.
|
void |
set(DynamicObject store,
java.lang.Object value,
Shape shape)
Set object value at this location in store.
|
protected abstract void |
setInternal(DynamicObject store,
java.lang.Object value)
Like
Location.set(DynamicObject, Object, Shape), but does not invalidate final locations. |
java.lang.String |
toString() |
static boolean |
valueEquals(java.lang.Object val1,
java.lang.Object val2)
Boxed values need to be compared by value not by reference.
|
checkShape, finalLocation, get, get, incompatibleLocation, set, setpublic void set(DynamicObject store, java.lang.Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException
BaseLocationset in interface BaseLocationset in class Locationshape - the current shape of the storage objectIncompatibleLocationException - for storage type invalidationsFinalLocationException - for effectively final fieldsprotected final java.lang.Object getInternal(DynamicObject store)
getInternal in class Locationprotected abstract 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 LocationIncompatibleLocationException - if value is of non-assignable typepublic final boolean canSet(DynamicObject store, java.lang.Object value)
Locationtrue if the location can be set to the value.public 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.protected boolean canStoreFinal(DynamicObject store, java.lang.Object value)
public boolean isFinal()
Locationtrue if this is a final location, i.e. readonly once set.public boolean isConstant()
Locationtrue if this is an immutable constant location.isConstant in class Locationpublic java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String getWhereString()
public int objectArrayCount()
public int objectFieldCount()
Object fields this location requires.public int primitiveFieldCount()
public int primitiveArrayCount()
public static boolean valueEquals(java.lang.Object val1,
java.lang.Object val2)