public abstract class Property
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
Property() |
Modifier and Type | Method and Description |
---|---|
abstract Property |
copyWithFlags(int newFlags)
Create a copy of the property with the given flags.
|
abstract Property |
copyWithRelocatable(boolean newRelocatable) |
static Property |
create(java.lang.Object key,
Location location,
int flags) |
abstract java.lang.Object |
get(DynamicObject store,
boolean condition)
Gets the value of this property of the object.
|
abstract java.lang.Object |
get(DynamicObject store,
Shape shape)
Gets the value of this property of the object.
|
abstract int |
getFlags()
Get property flags.
|
abstract java.lang.Object |
getKey()
Get property identifier.
|
abstract Location |
getLocation()
Get the property location.
|
abstract boolean |
isHidden()
Is this property hidden from iteration.
|
abstract boolean |
isSame(Property other)
Returns
true if this property and some other property have the same key and flags. |
abstract boolean |
isShadow() |
abstract Property |
relocate(Location newLocation)
Change the property's location.
|
abstract void |
set(DynamicObject store,
java.lang.Object value,
Shape shape)
Assigns value to this property of the object.
|
abstract void |
set(DynamicObject store,
java.lang.Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
abstract void |
setGeneric(DynamicObject store,
java.lang.Object value,
Shape shape)
Assigns value to this property of the object.
|
abstract void |
setGeneric(DynamicObject store,
java.lang.Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
abstract void |
setInternal(DynamicObject store,
java.lang.Object value)
Like
setSafe(com.oracle.truffle.api.object.DynamicObject, java.lang.Object, com.oracle.truffle.api.object.Shape) , but ignores the finalness of the property. |
abstract void |
setSafe(DynamicObject store,
java.lang.Object value,
Shape shape)
Like
set(DynamicObject, Object, Shape) , but throws an IllegalStateException
instead. |
abstract void |
setSafe(DynamicObject store,
java.lang.Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
public abstract java.lang.Object getKey()
public abstract int getFlags()
public abstract Property relocate(Location newLocation)
this
if the location is unchanged).public abstract java.lang.Object get(DynamicObject store, Shape shape)
store
- the store that this property resides inshape
- the current shape of the object, which must contain this locationDynamicObject.get(Object, Object)
public abstract java.lang.Object get(DynamicObject store, boolean condition)
store
- the store that this property resides incondition
- the result of a shape check or false
DynamicObject.get(Object, Object)
,
get(DynamicObject, Shape)
public abstract void set(DynamicObject store, java.lang.Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException
store
- the store that this property resides invalue
- the value to assignshape
- the current shape of the object or null
IncompatibleLocationException
- if the value is incompatible with the property locationFinalLocationException
- if the location is final and values differDynamicObject.set(Object, Object)
public abstract void setGeneric(DynamicObject store, java.lang.Object value, Shape shape)
shape
- the current shape of the object or null
public abstract void setSafe(DynamicObject store, java.lang.Object value, Shape shape)
set(DynamicObject, Object, Shape)
, but throws an IllegalStateException
instead.public abstract void setInternal(DynamicObject store, java.lang.Object value)
setSafe(com.oracle.truffle.api.object.DynamicObject, java.lang.Object, com.oracle.truffle.api.object.Shape)
, but ignores the finalness of the property. For internal use only.store
- the store that this property resides invalue
- the value to assignpublic abstract void set(DynamicObject store, java.lang.Object value, Shape oldShape, Shape newShape) throws IncompatibleLocationException
DynamicObject.setShapeAndGrow(Shape, Shape)
and
set(DynamicObject, Object, Shape)
to an atomic operation.store
- the store that this property resides invalue
- the value to assignoldShape
- the shape before the transitionnewShape
- the shape after the transitionIncompatibleLocationException
- if the value is incompatible with the property locationpublic abstract void setGeneric(DynamicObject store, java.lang.Object value, Shape oldShape, Shape newShape)
DynamicObject.setShapeAndGrow(Shape, Shape)
and
setGeneric(DynamicObject, Object, Shape)
to an atomic operation.store
- the store that this property resides invalue
- the value to assignoldShape
- the shape before the transitionnewShape
- the shape after the transitionpublic abstract void setSafe(DynamicObject store, java.lang.Object value, Shape oldShape, Shape newShape)
DynamicObject.setShapeAndGrow(Shape, Shape)
and
setSafe(DynamicObject, Object, Shape)
to an atomic operation.store
- the store that this property resides invalue
- the value to assignoldShape
- the shape before the transitionnewShape
- the shape after the transitionpublic abstract boolean isSame(Property other)
true
if this property and some other property have the same key and flags.public abstract Location getLocation()
public abstract boolean isHidden()
HiddenKey
public abstract boolean isShadow()
public abstract Property copyWithFlags(int newFlags)
public abstract Property copyWithRelocatable(boolean newRelocatable)