Package com.oracle.truffle.object.basic
Class BasicLocations.SimpleObjectFieldLocation
- java.lang.Object
-
- com.oracle.truffle.api.object.Location
-
- com.oracle.truffle.object.LocationImpl
-
- com.oracle.truffle.object.basic.BasicLocations.FieldLocation
-
- com.oracle.truffle.object.basic.BasicLocations.SimpleObjectFieldLocation
-
- All Implemented Interfaces:
BaseLocation
,ObjectLocation
,TypedLocation
- Enclosing class:
- BasicLocations
public abstract static class BasicLocations.SimpleObjectFieldLocation extends BasicLocations.FieldLocation implements ObjectLocation
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.oracle.truffle.object.LocationImpl
LocationImpl.EffectivelyFinalLocation<T extends Location>, LocationImpl.InternalLongLocation, LocationImpl.TypedObjectLocation<T extends Location & ObjectLocation>
-
-
Constructor Summary
Constructors Constructor Description SimpleObjectFieldLocation(int index)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canStore(java.lang.Object value)
Returnstrue
if the location is compatible with the value.abstract java.lang.Object
get(DynamicObject store, boolean condition)
Get object value as object at this location in store.java.lang.Class<? extends java.lang.Object>
getType()
The type of this location.boolean
isNonNull()
Iftrue
, this location does not acceptnull
values.int
objectFieldCount()
Get the number of in-objectObject
fields this location requires.abstract void
setInternal(DynamicObject store, java.lang.Object value)
LikeLocation.set(DynamicObject, Object, Shape)
, but does not invalidate final locations.-
Methods inherited from class com.oracle.truffle.object.basic.BasicLocations.FieldLocation
equals, getIndex, getWhereString, hashCode
-
Methods inherited from class com.oracle.truffle.object.LocationImpl
canSet, canStoreFinal, getInternal, isConstant, isFinal, objectArrayCount, primitiveArrayCount, primitiveFieldCount, set, toString, valueEquals
-
Methods inherited from class com.oracle.truffle.api.object.Location
checkShape, finalLocation, get, incompatibleLocation, set, set
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.oracle.truffle.api.object.BaseLocation
get, set, set, set
-
-
-
-
Method Detail
-
get
public abstract java.lang.Object get(DynamicObject store, boolean condition)
Description copied from interface:BaseLocation
Get object value as object at this location in store. For internal use only and subject to change, useBaseLocation.get(DynamicObject, Shape)
instead.- Specified by:
get
in interfaceBaseLocation
- Overrides:
get
in classLocation
condition
- the result of a shape check orfalse
- See Also:
BaseLocation.get(DynamicObject, Shape)
-
setInternal
public abstract void setInternal(DynamicObject store, java.lang.Object value)
Description copied from class:Location
LikeLocation.set(DynamicObject, Object, Shape)
, but does not invalidate final locations. For internal use only and subject to change, useDynamicObjectFactory
to create objects with predefined properties.- Specified by:
setInternal
in classLocationImpl
-
canStore
public boolean canStore(java.lang.Object value)
Description copied from class:Location
Returnstrue
if the location is compatible with the value. The value may still be rejected ifLocation.canSet(DynamicObject, Object)
returns false.- Overrides:
canStore
in classLocationImpl
- Parameters:
value
- the value in question
-
getType
public java.lang.Class<? extends java.lang.Object> getType()
Description copied from interface:TypedLocation
The type of this location.- Specified by:
getType
in interfaceObjectLocation
- Specified by:
getType
in interfaceTypedLocation
-
isNonNull
public boolean isNonNull()
Description copied from interface:ObjectLocation
Iftrue
, this location does not acceptnull
values.- Specified by:
isNonNull
in interfaceObjectLocation
-
objectFieldCount
public int objectFieldCount()
Description copied from class:LocationImpl
Get the number of in-objectObject
fields this location requires.- Overrides:
objectFieldCount
in classLocationImpl
-
-