Package com.oracle.truffle.object.basic
Class BasicLocations.DoubleLocationDecorator
- java.lang.Object
-
- com.oracle.truffle.api.object.Location
-
- com.oracle.truffle.object.LocationImpl
-
- com.oracle.truffle.object.basic.BasicLocations.PrimitiveLocationDecorator
-
- com.oracle.truffle.object.basic.BasicLocations.DoubleLocationDecorator
-
- All Implemented Interfaces:
BaseLocation,DoubleLocation,TypedLocation
- Enclosing class:
- BasicLocations
public static class BasicLocations.DoubleLocationDecorator extends BasicLocations.PrimitiveLocationDecorator implements DoubleLocation
-
-
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 DoubleLocationDecorator(LocationImpl.InternalLongLocation longLocation, boolean allowInt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanStore(java.lang.Object value)Returnstrueif the location is compatible with the value.java.lang.Objectget(DynamicObject store, boolean condition)Get object value as object at this location in store.doublegetDouble(DynamicObject store, boolean condition)doublegetDouble(DynamicObject store, Shape shape)java.lang.Class<java.lang.Double>getType()The type of this location.voidsetDouble(DynamicObject store, double value)voidsetDouble(DynamicObject store, double value, Shape shape)voidsetDouble(DynamicObject store, double value, Shape oldShape, Shape newShape)voidsetInternal(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.PrimitiveLocationDecorator
getLong, getLong, primitiveArrayCount, primitiveFieldCount, setLong, setLong, setLongInternal
-
Methods inherited from class com.oracle.truffle.object.LocationImpl
canSet, canStoreFinal, equals, getInternal, getWhereString, hashCode, isConstant, isFinal, objectArrayCount, objectFieldCount, 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
-
-
-
-
Constructor Detail
-
DoubleLocationDecorator
public DoubleLocationDecorator(LocationImpl.InternalLongLocation longLocation, boolean allowInt)
-
-
Method Detail
-
get
public final java.lang.Object get(DynamicObject store, boolean condition)
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:
BaseLocation.get(DynamicObject, Shape)
-
getDouble
public double getDouble(DynamicObject store, boolean condition)
- Specified by:
getDoublein interfaceDoubleLocation- See Also:
BaseLocation.get(DynamicObject, boolean)
-
setDouble
public void setDouble(DynamicObject store, double value, Shape shape)
- Specified by:
setDoublein interfaceDoubleLocation- See Also:
BaseLocation.set(DynamicObject, Object, Shape)
-
setDouble
public void setDouble(DynamicObject store, double value)
- Specified by:
setDoublein interfaceDoubleLocation- See Also:
BaseLocation.set(DynamicObject, Object)
-
setInternal
public final void setInternal(DynamicObject store, java.lang.Object value) throws IncompatibleLocationException
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- Throws:
IncompatibleLocationException- if value is of non-assignable type
-
getDouble
public final double getDouble(DynamicObject store, Shape shape)
- Specified by:
getDoublein interfaceDoubleLocation- See Also:
BaseLocation.get(DynamicObject, Shape)
-
canStore
public final boolean canStore(java.lang.Object value)
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
-
setDouble
public final void setDouble(DynamicObject store, double value, Shape oldShape, Shape newShape)
- Specified by:
setDoublein interfaceDoubleLocation- See Also:
BaseLocation.set(DynamicObject, Object, Shape, Shape)
-
getType
public java.lang.Class<java.lang.Double> getType()
Description copied from interface:TypedLocationThe type of this location.- Specified by:
getTypein interfaceDoubleLocation- Specified by:
getTypein interfaceTypedLocation
-
-