public static class Locations.DeclaredDualLocation extends Locations.DualLocation
LocationImpl.EffectivelyFinalLocation<T extends Location>, LocationImpl.InternalLongLocation, LocationImpl.TypedObjectLocation<T extends Location & ObjectLocation>
layout, objectLocation, primitiveLocation
Constructor and Description |
---|
DeclaredDualLocation(LocationImpl.InternalLongLocation primitiveLocation,
ObjectLocation objectLocation,
java.lang.Object defaultValue,
LayoutImpl layout) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStore(java.lang.Object value)
Returns
true if the location is compatible with the value. |
Locations.DualLocation |
changeType(java.lang.Class<?> newType) |
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
get(DynamicObject store,
boolean condition)
Get object value as object at this location in store.
|
int |
hashCode() |
void |
setInternal(DynamicObject store,
java.lang.Object value)
Like
Location.set(DynamicObject, Object, Shape) , but does not invalidate final locations. |
java.lang.String |
toString() |
getObjectLocation, getType, isNonNull, objectArrayCount, objectFieldCount, primitiveArrayCount, primitiveFieldCount
canSet, canStoreFinal, getInternal, getWhereString, isConstant, isFinal, set, valueEquals
checkShape, finalLocation, get, incompatibleLocation, set, set
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
get, set, set, set
public DeclaredDualLocation(LocationImpl.InternalLongLocation primitiveLocation, ObjectLocation objectLocation, java.lang.Object defaultValue, LayoutImpl layout)
public java.lang.Object get(DynamicObject store, boolean condition)
BaseLocation
BaseLocation.get(DynamicObject, Shape)
instead.get
in interface BaseLocation
get
in class Locations.DualLocation
condition
- the result of a shape check or false
BaseLocation.get(DynamicObject, Shape)
public 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 Locations.DualLocation
IncompatibleLocationException
- if value is of non-assignable typepublic boolean equals(java.lang.Object obj)
equals
in class Locations.DualLocation
public int hashCode()
hashCode
in class Locations.DualLocation
public Locations.DualLocation changeType(java.lang.Class<?> newType)
changeType
in class Locations.DualLocation
public 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 Locations.DualLocation
value
- the value in questionpublic java.lang.String toString()
toString
in class Locations.DualLocation