Class DynamicObject.ContainsKeyNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.object.DynamicObject.ContainsKeyNode
- All Implemented Interfaces:
NodeInterface, Cloneable
- Enclosing class:
DynamicObject
Checks if this object contains a property with the given key.
- Since:
- 25.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Node
Node.Child, Node.Children -
Method Summary
Modifier and TypeMethodDescriptioncreate()abstract booleanexecute(DynamicObject receiver, Object key) Returnstrueif this object contains a property with the given key.Methods 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
Returnstrueif this object contains a property with the given key.Usage example:
Member name equality check omitted for brevity.@ExportMessage(name = "isMemberReadable") @ExportMessage(name = "isMemberRemovable") boolean isMemberReadable(String member, @Cached @Shared DynamicObject.ContainsKeyNode containsKeyNode) { return containsKeyNode.execute(this, member); }- Parameters:
key- the property key, compared by identity (==), not equality (equals). SeeDynamicObjectfor more information.- Returns:
trueif the object contains a property with this key, elsefalse
-
create
- Since:
- 25.1
-
getUncached
- Since:
- 25.1
-