public class PropertyImpl extends Property
| Modifier | Constructor and Description |
|---|---|
|
PropertyImpl(Object name,
Location location,
int flags) |
protected |
PropertyImpl(Object key,
Location location,
int flags,
boolean shadow,
boolean relocatable)
Generic, usual-case constructor for properties storing at least a name.
|
| Modifier and Type | Method and Description |
|---|---|
protected Property |
construct(Object name,
Location location,
int flags) |
Property |
copyWithFlags(int newFlags)
Create a copy of the property with the given flags.
|
Property |
copyWithRelocatable(boolean newRelocatable) |
boolean |
equals(Object obj) |
Object |
get(DynamicObject store,
boolean condition)
Gets the value of this property of the object.
|
Object |
get(DynamicObject store,
Shape shape)
Gets the value of this property of the object.
|
int |
getFlags()
Get property flags, which are free for language-specific use.
|
Object |
getKey()
Get property identifier.
|
Location |
getLocation()
Get the property location.
|
int |
hashCode() |
boolean |
isHidden()
Is this property hidden from iteration.
|
boolean |
isSame(Property obj)
Returns
true if this property and some other property have the same key and flags. |
Property |
relocate(Location newLocation)
Change the property's location.
|
void |
set(DynamicObject store,
Object value,
Shape shape)
Assigns value to this property of the object.
|
void |
set(DynamicObject store,
Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
void |
setGeneric(DynamicObject store,
Object value,
Shape shape)
Assigns value to this property of the object.
|
void |
setGeneric(DynamicObject store,
Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
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. |
void |
setSafe(DynamicObject store,
Object value,
Shape shape)
Like
Property.set(DynamicObject, Object, Shape), but throws an IllegalStateException
instead. |
void |
setSafe(DynamicObject store,
Object value,
Shape oldShape,
Shape newShape)
Assigns value to this property of the object, changing the object's shape.
|
String |
toString() |
protected PropertyImpl(Object key, Location location, int flags, boolean shadow, boolean relocatable)
key - the name of the propertylocation - the storage location used to access the propertyflags - property flags (optional)public final Object getKey()
Propertypublic int getFlags()
Propertypublic Property relocate(Location newLocation)
Propertypublic final Object get(DynamicObject store, Shape shape)
Propertyget in class Propertystore - the store that this property resides inshape - the current shape of the object, which must contain this locationDynamicObject.get(Object, Object)public final Object get(DynamicObject store, boolean condition)
Propertyget in class Propertystore - the store that this property resides incondition - the result of a shape check or falseDynamicObject.get(Object, Object),
Property.get(DynamicObject, Shape)public final void setInternal(DynamicObject store, Object value)
PropertyProperty.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.setInternal in class Propertystore - the store that this property resides invalue - the value to assignpublic final void set(DynamicObject store, Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException
Propertyset in class Propertystore - 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 final void setSafe(DynamicObject store, Object value, Shape shape)
PropertyProperty.set(DynamicObject, Object, Shape), but throws an IllegalStateException
instead.public final void setGeneric(DynamicObject store, Object value, Shape shape)
PropertysetGeneric in class Propertyshape - the current shape of the object or nullpublic final void set(DynamicObject store, Object value, Shape oldShape, Shape newShape) throws IncompatibleLocationException
PropertyDynamicObject.setShapeAndGrow(Shape, Shape) and
Property.set(DynamicObject, Object, Shape) to an atomic operation.set in class Propertystore - 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 final void setSafe(DynamicObject store, Object value, Shape oldShape, Shape newShape)
PropertyDynamicObject.setShapeAndGrow(Shape, Shape) and
Property.setSafe(DynamicObject, Object, Shape) to an atomic operation.public final void setGeneric(DynamicObject store, Object value, Shape oldShape, Shape newShape)
PropertyDynamicObject.setShapeAndGrow(Shape, Shape) and
Property.setGeneric(DynamicObject, Object, Shape) to an atomic operation.setGeneric in class Propertystore - the store that this property resides invalue - the value to assignoldShape - the shape before the transitionnewShape - the shape after the transitionpublic boolean isSame(Property obj)
Propertytrue if this property and some other property have the same key and flags.public final Location getLocation()
PropertygetLocation in class Propertypublic final boolean isHidden()
Propertyprotected Property construct(Object name, Location location, int flags)
public Property copyWithFlags(int newFlags)
PropertycopyWithFlags in class Propertypublic Property copyWithRelocatable(boolean newRelocatable)
copyWithRelocatable in class Property