public static final class InlineSupport.ReferenceField<T> extends InlineSupport.InlinableField
Modifier and Type | Method and Description |
---|---|
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.
|
static <T> InlineSupport.ReferenceField<T> |
create(MethodHandles.Lookup declaringLookup,
String field,
Class<T> valueClass)
This method creates a new field given a lookup class, field name and value class.
|
InlineSupport.ReferenceField<T> |
createParentAccessor(Class<? extends Node> parentClass)
This method creates a parent accessor field.
|
T |
get(Node node)
This method returns the value of the target field given a target node.
|
T |
getVolatile(Node node)
This method returns the value of the target field given a target node using volatile
semantics.
|
void |
set(Node node,
T value)
This method sets the value of the target field giving the a target node.
|
validate
public InlineSupport.ReferenceField<T> createParentAccessor(Class<? extends Node> parentClass)
public T get(Node node)
ClassCastException
is thrown. If null
is provided, then a
NullPointerException
is thrown.public void set(Node node, T value)
ClassCastException
is thrown. If null
is provided, then a
NullPointerException
is thrown.public T getVolatile(Node node)
ClassCastException
is thrown. If null
is
provided, then a NullPointerException
is thrown.public boolean compareAndSet(Node node, T expect, T update)
ClassCastException
is thrown.
If null
is provided, then a NullPointerException
is thrown.public static <T> InlineSupport.ReferenceField<T> create(MethodHandles.Lookup declaringLookup, String field, Class<T> valueClass)
IllegalArgumentException
is thrown. The given field must not be final. This
method is intended to be used by DSL-generated code only.