Class Location
java.lang.Object
com.oracle.truffle.api.object.Location
Property location.
Planned to be deprecated.
- Since:
- 0.8 or earlier
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the location is compatible with the type of the value.booleanMust be overridden in subclasses.final Objectget(DynamicObject store) Deprecated.get(DynamicObject store, boolean condition) Deprecated.final Objectget(DynamicObject store, Shape shape) Deprecated.If this is a constant location, returns the constant value bound to this location.protected doublegetDouble(DynamicObject store, boolean guard) Gets this location's value as double.Returns the assumption that this location is final.protected intgetInt(DynamicObject store, boolean guard) Gets this location's value as int.protected longgetLong(DynamicObject store, boolean guard) Gets this location's value as long.inthashCode()Must be overridden in subclasses.booleanReturnstrueif this location is assumed to be final.booleanReturnstrueif this is a constant value location.booleanisFinal()Deprecated.booleanReturnstrueif this location can only store primitive types and cannot contain any object references.booleanisValue()Returnstrueif this is a value location.voidset(DynamicObject store, Object value, Shape shape) Deprecated.toString()
-
Method Details
-
get
Deprecated.Get object value as object at this location in store.- Parameters:
shape- the current shape of the object, which must contain this location- Since:
- 0.8 or earlier
-
get
Deprecated.Get object value as object at this location in store. For internal use only and subject to change, useget(DynamicObject, Shape)instead.- Parameters:
store- storage objectcondition- the result of a shape check orfalse- Since:
- 0.8 or earlier
- See Also:
-
get
Deprecated.Get object value as object at this location in store.- Since:
- 0.8 or earlier
-
getInt
Gets this location's value as int.- Parameters:
store- storage objectguard- the result of a shape check orfalse- Throws:
UnexpectedResultException- if the location does not contain an int value.- Since:
- 22.2
-
getLong
Gets this location's value as long.- Parameters:
store- storage objectguard- the result of a shape check orfalse- Throws:
UnexpectedResultException- if the location does not contain a long value.- Since:
- 22.2
-
getDouble
Gets this location's value as double.- Parameters:
store- storage objectguard- the result of a shape check orfalse- Throws:
UnexpectedResultException- if the location does not contain a double value.- Since:
- 22.2
-
set
@Deprecated(since="22.2") public void set(DynamicObject store, Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException Deprecated.Set object value at this location in store.- Parameters:
store- storage objectvalue- the value to setshape- the current shape of the storage object- Throws:
IncompatibleLocationException- for storage type invalidationsFinalLocationException- for effectively final fields- Since:
- 0.8 or earlier
-
canStore
Returnstrueif the location is compatible with the type of the value.- Parameters:
value- the value in question- Since:
- 0.8 or earlier
-
isFinal
Deprecated.UseisAssumedFinal()instead or replace byfalse.Returnstrueif this is a final location, i.e. readonly once set.- Since:
- 0.8 or earlier
- See Also:
-
isConstant
public boolean isConstant()Returnstrueif this is a constant value location.- Since:
- 0.8 or earlier
-
hashCode
-
equals
-
toString
-
isValue
public boolean isValue()Returnstrueif this is a value location.- Since:
- 0.18
- See Also:
-
isAssumedFinal
public boolean isAssumedFinal()Returnstrueif this location is assumed to be final.- Since:
- 0.18
- See Also:
-
getFinalAssumption
Returns the assumption that this location is final.- Since:
- 0.18
- See Also:
-
isPrimitive
public boolean isPrimitive()Returnstrueif this location can only store primitive types and cannot contain any object references.- Since:
- 22.2
-
getConstantValue
If this is a constant location, returns the constant value bound to this location. Otherwise, returns null.- Since:
- 22.2
-
isAssumedFinal()instead or replace byfalse.