Elide GraalVM25.6.0-elide.4
All types
Versions and modules

InlineSupport.ReferenceField

Javaclassin com.oracle.truffle.api.dslsince 23.0

public static final class InlineSupport.ReferenceField<T> extends InlineSupport.InlinableField
Inheritance
  1. Object
  2. InlineSupport.UnsafeField
  3. InlineSupport.InlinableField
  4. ReferenceField
Enclosing type
InlineSupport

Represents a field for references in inlined nodes.

Members shown

Methods5 + 1 inherited

T get(Node)

get

since 23.0
public T get(Node node)

This method returns the value of the target field given a target node. The node parameter must match the class the field was created with. If the type is not compatible, an ClassCastException is thrown. If null is provided, then a NullPointerException is thrown.

Parameters

nodeNode
No description.

Returns

T
No description.
void set(Node, T)

set

since 23.0
public void set(Node node, T value)

This method sets the value of the target field giving the a target node. The node parameter must match the class the field was created with. If the type is not compatible, an ClassCastException is thrown. If null is provided, then a NullPointerException is thrown.

Parameters

nodeNode
No description.
valueT
No description.
T getVolatile(Node)

getVolatile

since 23.0
public T getVolatile(Node node)

This method returns the value of the target field given a target node using volatile semantics. The node parameter must match the class the field was created with. If the type is not compatible, an ClassCastException is thrown. If null is provided, then a NullPointerException is thrown.

Parameters

nodeNode
No description.

Returns

T
No description.
boolean compareAndSet(Node, T, T)

compareAndSet

since 23.0
public boolean compareAndSet(Node node, T expect, T update)

This method sets the value of the target field giving the a target node and expected value using compare and set semantics. The node parameter must match the class the field was created with. If the type is not compatible, an ClassCastException is thrown. If null is provided, then a NullPointerException is thrown.

Parameters

nodeNode
No description.
expectT
No description.
updateT
No description.

Returns

boolean
No description.
static InlineSupport.ReferenceField<T> create(MethodHandles.Lookup, String, Class<? super T>)

create

staticsince 23.0
public static <T> InlineSupport.ReferenceField<T> create(
    MethodHandles.Lookup declaringLookup,
    String field,
    Class<? super T> valueClass
)

This method creates a new field given a lookup class, field name and value class. The lookup class requires access to the field and must be directly accessible. If the field is not found or the field type is not compatible, then an IllegalArgumentException is thrown. The given field must not be final. This method is intended to be used by DSL-generated code only.

Parameters

declaringLookupMethodHandles.Lookup
No description.
fieldString
No description.
valueClassClass<? super T>
No description.

Returns

Inherited members