Class DynamicObject.RemoveKeyNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.object.DynamicObject.RemoveKeyNode
- All Implemented Interfaces:
NodeInterface, Cloneable
- Enclosing class:
DynamicObject
Removes the property with the given key from the object.
- Since:
- 25.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Node
Node.Child, Node.Children -
Method Summary
Modifier and TypeMethodDescriptionstatic DynamicObject.RemoveKeyNodecreate()abstract booleanexecute(DynamicObject receiver, Object key) Removes the property with the given key from the object.static DynamicObject.RemoveKeyNodeMethods inherited from class Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString
-
Method Details
-
execute
Removes the property with the given key from the object.Usage example:
Member name equality check omitted for brevity.@ExportMessage void removeMember(String member, @Cached @Shared DynamicObject.GetShapeFlagsNode getShapeFlagsNode, @Cached DynamicObject.RemoveKeyNode removeKeyNode) throws UnknownIdentifierException, UnsupportedMessageException { if ((getShapeFlagsNode.execute(this) & FROZEN) == FROZEN) { throw UnsupportedMessageException.create(); } if (!removeKeyNode.execute(this, member)) { throw UnknownIdentifierException.create(member); } }- Parameters:
key- the property key, compared by identity (==), not equality (equals). SeeDynamicObjectfor more information.- Returns:
trueif the property was removed orfalseif property was not found
-
create
- Since:
- 25.1
-
getUncached
- Since:
- 25.1
-