Package com.oracle.truffle.object.basic
Class BasicLocations.BooleanLocationDecorator
- 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.BooleanLocationDecorator
-
- All Implemented Interfaces:
BaseLocation
,BooleanLocation
,TypedLocation
- Enclosing class:
- BasicLocations
public static class BasicLocations.BooleanLocationDecorator extends BasicLocations.PrimitiveLocationDecorator implements BooleanLocation
-
-
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 BooleanLocationDecorator(LocationImpl.InternalLongLocation longLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canStore(java.lang.Object value)
Returnstrue
if the location is compatible with the value.java.lang.Object
get(DynamicObject store, boolean condition)
Get object value as object at this location in store.boolean
getBoolean(DynamicObject store, boolean condition)
boolean
getBoolean(DynamicObject store, Shape shape)
java.lang.Class<java.lang.Boolean>
getType()
The type of this location.void
setBoolean(DynamicObject store, boolean value)
void
setBoolean(DynamicObject store, boolean value, Shape shape)
void
setBoolean(DynamicObject store, boolean value, Shape oldShape, Shape newShape)
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.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
-
BooleanLocationDecorator
public BooleanLocationDecorator(LocationImpl.InternalLongLocation longLocation)
-
-
Method Detail
-
get
public final 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)
-
getBoolean
public boolean getBoolean(DynamicObject store, boolean condition)
- Specified by:
getBoolean
in interfaceBooleanLocation
- See Also:
BaseLocation.get(DynamicObject, boolean)
-
setBoolean
public void setBoolean(DynamicObject store, boolean value, Shape shape)
- Specified by:
setBoolean
in interfaceBooleanLocation
- See Also:
BaseLocation.set(DynamicObject, Object, Shape)
-
setBoolean
public void setBoolean(DynamicObject store, boolean value)
- Specified by:
setBoolean
in interfaceBooleanLocation
- See Also:
BaseLocation.set(DynamicObject, Object)
-
setInternal
public final void setInternal(DynamicObject store, java.lang.Object value) throws IncompatibleLocationException
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
- Throws:
IncompatibleLocationException
- if value is of non-assignable type
-
getBoolean
public final boolean getBoolean(DynamicObject store, Shape shape)
- Specified by:
getBoolean
in interfaceBooleanLocation
- See Also:
BaseLocation.get(DynamicObject, Shape)
-
canStore
public final 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
-
setBoolean
public final void setBoolean(DynamicObject store, boolean value, Shape oldShape, Shape newShape)
- Specified by:
setBoolean
in interfaceBooleanLocation
- See Also:
BaseLocation.set(DynamicObject, Object, Shape, Shape)
-
getType
public java.lang.Class<java.lang.Boolean> getType()
Description copied from interface:TypedLocation
The type of this location.- Specified by:
getType
in interfaceBooleanLocation
- Specified by:
getType
in interfaceTypedLocation
-
-