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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the location is compatible with the value.abstract Objectget(DynamicObject store, boolean condition) Get object value as object at this location in store.getType()The type of this location.booleanIftrue, this location does not acceptnullvalues.intGet the number of in-objectObjectfields this location requires.abstract voidsetInternal(DynamicObject store, 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, hashCodeMethods inherited from class com.oracle.truffle.object.LocationImpl
canSet, canStoreFinal, getInternal, isConstant, isFinal, objectArrayCount, primitiveArrayCount, primitiveFieldCount, set, toString, valueEqualsMethods inherited from class com.oracle.truffle.api.object.Location
checkShape, finalLocation, get, incompatibleLocation, set, setMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.api.object.BaseLocation
get, set, set, set
-
Constructor Details
-
SimpleObjectFieldLocation
public SimpleObjectFieldLocation(int index)
-
-
Method Details
-
get
Description copied from interface:BaseLocationGet object value as object at this location in store. For internal use only and subject to change, useBaseLocation.get(DynamicObject, Shape)instead.- Specified by:
getin interfaceBaseLocation- Overrides:
getin classLocationcondition- the result of a shape check orfalse- See Also:
-
setInternal
Description copied from class:LocationLikeLocation.set(DynamicObject, Object, Shape), but does not invalidate final locations. For internal use only and subject to change, useDynamicObjectFactoryto create objects with predefined properties.- Specified by:
setInternalin classLocationImpl
-
canStore
Description copied from class:LocationReturnstrueif the location is compatible with the value. The value may still be rejected ifLocation.canSet(DynamicObject, Object)returns false.- Overrides:
canStorein classLocationImpl- Parameters:
value- the value in question
-
getType
Description copied from interface:TypedLocationThe type of this location.- Specified by:
getTypein interfaceObjectLocation- Specified by:
getTypein interfaceTypedLocation
-
isNonNull
public boolean isNonNull()Description copied from interface:ObjectLocationIftrue, this location does not acceptnullvalues.- Specified by:
isNonNullin interfaceObjectLocation
-
objectFieldCount
public int objectFieldCount()Description copied from class:LocationImplGet the number of in-objectObjectfields this location requires.- Overrides:
objectFieldCountin classLocationImpl
-