public abstract class Property extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Property()
Constructor for subclasses.
|
| 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(Object key,
Location location,
int flags)
Create a new property.
|
abstract Object |
get(DynamicObject store,
boolean condition)
Gets the value of this property of the object.
|
abstract Object |
get(DynamicObject store,
Shape shape)
Gets the value of this property of the object.
|
abstract int |
getFlags()
Get property flags, which are free for language-specific use.
|
abstract 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 Property |
relocate(Location newLocation)
Change the property's location.
|
abstract void |
set(DynamicObject store,
Object value,
Shape shape)
Assigns value to this property of the object.
|
abstract void |
set(DynamicObject store,
Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
abstract void |
setGeneric(DynamicObject store,
Object value,
Shape shape)
Assigns value to this property of the object.
|
abstract void |
setGeneric(DynamicObject store,
Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
abstract void |
setInternal(DynamicObject store,
Object value)
Like
Property.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,
Object value,
Shape shape)
Like
Property.set(DynamicObject, Object, Shape), but throws an IllegalStateException
instead. |
abstract void |
setSafe(DynamicObject store,
Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
public static Property create(Object key, Location location, int flags)
key - the key of the propertylocation - location of the propertyflags - for language-specific usepublic abstract Object getKey()
public abstract int getFlags()
public abstract Property relocate(Location newLocation)
this if the location is unchanged).public abstract 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 Object get(DynamicObject store, boolean condition)
store - the store that this property resides incondition - the result of a shape check or falseDynamicObject.get(Object, Object),
Property.get(DynamicObject, Shape)public abstract void set(DynamicObject store, 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 nullIncompatibleLocationException - 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, Object value, Shape shape)
shape - the current shape of the object or nullpublic abstract void setSafe(DynamicObject store, Object value, Shape shape)
Property.set(DynamicObject, Object, Shape), but throws an IllegalStateException
instead.public abstract void setInternal(DynamicObject store, Object value)
Property.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, Object value, Shape oldShape, Shape newShape) throws IncompatibleLocationException
DynamicObject.setShapeAndGrow(Shape, Shape) and
Property.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, Object value, Shape oldShape, Shape newShape)
DynamicObject.setShapeAndGrow(Shape, Shape) and
Property.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, Object value, Shape oldShape, Shape newShape)
DynamicObject.setShapeAndGrow(Shape, Shape) and
Property.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()
HiddenKeypublic abstract Property copyWithFlags(int newFlags)
public abstract Property copyWithRelocatable(boolean newRelocatable)