| Modifier and Type | Field and Description |
|---|---|
| private static final MethodHandle | |
| private final MethodHandle | |
| private final MethodHandle |
| Access | Constructor and Description |
|---|---|
| public | FieldVariableAccessor(RubyClass
the "real" class realClass, String the variable's name name, int the variable's index index, int the class's ID classId, MethodHandle the getter handle for the field getter, MethodHandle the setter handle for the field setter)Construct a new FieldVariableAccessor for the given "real" class, variable name, variable index, class ID, and field offset |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: the variable's valuethe object from which to retrieve this variable object)Overrides org. Retrieve the variable's value from the given object. |
| public MethodHandle | |
| public IRubyObject | Returns: the variable's valuethe object from which to retrieve this variable object, ThreadContext context)Overrides org. Retrieve the variable's value from the given object. |
| public MethodHandle | |
| public void | set(Object
the object into which to set this variable object, Object the variable's value value)Overrides org. Set this variable into the given object using Unsafe to ensure safe updating of the variable table. |
| protected MethodHandle |
| ENSURE_SETTABLE | back to summary |
|---|---|
| private static final MethodHandle ENSURE_SETTABLE | |
| getter | back to summary |
|---|---|
| private final MethodHandle getter | |
| setter | back to summary |
|---|---|
| private final MethodHandle setter | |
| FieldVariableAccessor | back to summary |
|---|---|
| public FieldVariableAccessor(RubyClass realClass, String name, int index, int classId, MethodHandle getter, MethodHandle setter) Construct a new FieldVariableAccessor for the given "real" class, variable name, variable index, class ID, and field offset
| |
| get | back to summary |
|---|---|
| public Object get(Object object) Overrides org. Retrieve the variable's value from the given object. | |
| getGetter | back to summary |
|---|---|
| public MethodHandle getGetter() | |
| getOrNil | back to summary |
|---|---|
| public IRubyObject getOrNil(Object object, ThreadContext context) Overrides org. Retrieve the variable's value from the given object.
| |
| getSetter | back to summary |
|---|---|
| public MethodHandle getSetter() | |
| set | back to summary |
|---|---|
| public void set(Object object, Object value) Overrides org. Set this variable into the given object using Unsafe to ensure safe updating of the variable table. | |
| wrapSetter | back to summary |
|---|---|
| protected MethodHandle wrapSetter(MethodHandle setter) | |