Package com.oracle.truffle.object
Class Locations.DeclaredDualLocation
java.lang.Object
com.oracle.truffle.api.object.Location
com.oracle.truffle.object.LocationImpl
com.oracle.truffle.object.Locations.DualLocation
com.oracle.truffle.object.Locations.DeclaredDualLocation
- All Implemented Interfaces:
BaseLocation,TypedLocation
- Enclosing class:
- Locations
-
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> -
Field Summary
Fields inherited from class com.oracle.truffle.object.Locations.DualLocation
layout, objectLocation, primitiveLocation -
Constructor Summary
ConstructorsConstructorDescriptionDeclaredDualLocation(LocationImpl.InternalLongLocation primitiveLocation, ObjectLocation objectLocation, Object defaultValue, LayoutImpl layout) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the location is compatible with the value.changeType(Class<?> newType) booleanget(DynamicObject store, boolean condition) Get object value as object at this location in store.inthashCode()voidsetInternal(DynamicObject store, Object value) LikeLocation.set(DynamicObject, Object, Shape), but does not invalidate final locations.toString()Methods inherited from class com.oracle.truffle.object.Locations.DualLocation
getObjectLocation, getType, isNonNull, objectArrayCount, objectFieldCount, primitiveArrayCount, primitiveFieldCountMethods inherited from class com.oracle.truffle.object.LocationImpl
canSet, canStoreFinal, getInternal, getWhereString, isConstant, isFinal, set, 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
-
DeclaredDualLocation
public DeclaredDualLocation(LocationImpl.InternalLongLocation primitiveLocation, ObjectLocation objectLocation, Object defaultValue, LayoutImpl layout)
-
-
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 classLocations.DualLocationcondition- 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.- Overrides:
setInternalin classLocations.DualLocation- Throws:
IncompatibleLocationException- if value is of non-assignable type
-
equals
- Overrides:
equalsin classLocations.DualLocation
-
hashCode
public int hashCode()- Overrides:
hashCodein classLocations.DualLocation
-
changeType
- Overrides:
changeTypein classLocations.DualLocation
-
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 classLocations.DualLocation- Parameters:
value- the value in question
-
toString
- Overrides:
toStringin classLocations.DualLocation
-