public abstract class LocationImpl extends Location
| Modifier and Type | Class and Description |
|---|---|
static interface |
LocationImpl.InternalLongLocation |
static interface |
LocationImpl.LocationVisitor |
| Modifier | Constructor and Description |
|---|---|
protected |
LocationImpl() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
accept(LocationImpl.LocationVisitor locationVisitor)
Accept a visitor for location allocation for this and every nested location.
|
boolean |
canSet(DynamicObject store,
Object value)
Returns
true if the location can be set to the given value. |
boolean |
canSet(Object value)
Returns
true if the location can be set to the value. |
boolean |
canStore(Object value)
Returns
true if the location is compatible with the type of the value. |
protected boolean |
canStoreFinal(DynamicObject store,
Object value) |
boolean |
equals(Object obj)
Abstract to force overriding.
|
protected Object |
getInternal(DynamicObject store) |
protected String |
getWhereString() |
int |
hashCode()
Abstract to force overriding.
|
boolean |
isConstant()
Returns
true if this is a constant value 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,
Object value,
Shape shape)
Set object value at this location in store.
|
protected abstract void |
setInternal(DynamicObject store,
Object value)
Like
Location.set(DynamicObject, Object, Shape), but does not invalidate final locations. |
String |
toString() |
static boolean |
valueEquals(Object val1,
Object val2)
Boxed values need to be compared by value not by reference.
|
checkShape, finalLocation, get, get, get, getFinalAssumption, incompatibleLocation, isAssumedFinal, isDeclared, isValue, set, setpublic void set(DynamicObject store, Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException
Locationset in class Locationshape - the current shape of the storage objectIncompatibleLocationException - for storage type invalidationsFinalLocationException - for effectively final fieldsprotected final Object getInternal(DynamicObject store)
getInternal in class Locationprotected abstract 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 LocationIncompatibleLocationException - if value is of non-assignable typepublic boolean canSet(DynamicObject store, Object value)
Locationtrue if the location can be set to the given value.public boolean canSet(Object value)
Locationtrue if the location can be set to the value.public boolean canStore(Object value)
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.protected boolean canStoreFinal(DynamicObject store, Object value)
public boolean isFinal()
Locationtrue if this is a final location, i.e. readonly once set.public boolean isConstant()
Locationtrue if this is a constant value location.isConstant in class Locationpublic int hashCode()
Locationpublic boolean equals(Object obj)
Locationprotected String getWhereString()
public int objectArrayCount()
public int objectFieldCount()
Object fields this location requires.public int primitiveFieldCount()
public int primitiveArrayCount()
public abstract void accept(LocationImpl.LocationVisitor locationVisitor)
locationVisitor - visitor to be notified of every allocated slot in use by this locationpublic static boolean valueEquals(Object val1, Object val2)