Top Description Constructors Methods
org.jruby.runtime.ivars

public Class RawFieldVariableAccessor

extends FieldVariableAccessor
Class Inheritance
Imports
com.headius.invokebinder.Binder, org.jruby.Ruby, .RubyClass, org.jruby.exceptions.RaiseException, org.jruby.java.proxies.ConcreteJavaProxy, org.jruby.javasupport.JavaUtil, org.jruby.runtime.Helpers, org.jruby.runtime.builtin.IRubyObject, org.jruby.specialized.RubyObjectSpecializer, java.lang.invoke.MethodHandle, .MethodHandles

A variable accessor that accesses a reified java field directly (Storing java objects that may not be IRubyObjects

Constructor Summary

AccessConstructor and Description
public
RawFieldVariableAccessor(RubyClass
the "real" class
realClass
,
boolean
if the setter should unwrap ruby objects for java use use
unwrapInSet
,
Class<?>
the variable's java type
toJava
,
Class<?> returnType, 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 RawFieldVariableAccessor for the given "real" class, variable name, variable index, class ID, and field offset

Method Summary

Modifier and TypeMethod and Description
protected static MethodHandle
wrapGetter(MethodHandle getter, RubyClass realClass, Class<?> basetype)

protected MethodHandle
protected static MethodHandle
wrapSetter(MethodHandle setter, RubyClass realClass, boolean unwrap, Class<?> toJava, Class<?> basetype)

Inherited from org.jruby.runtime.ivars.FieldVariableAccessor:
getgetGettergetOrNilgetSetterset

Constructor Detail

RawFieldVariableAccessorback to summary
public RawFieldVariableAccessor(RubyClass realClass, boolean unwrapInSet, Class<?> toJava, Class<?> returnType, String name, int index, int classId, MethodHandle getter, MethodHandle setter)

Construct a new RawFieldVariableAccessor for the given "real" class, variable name, variable index, class ID, and field offset

Parameters
realClass:RubyClass

the "real" class

unwrapInSet:boolean

if the setter should unwrap ruby objects for java use use

toJava:Class<?>

the variable's java type

name:String

the variable's name

index:int

the variable's index

classId:int

the class's ID

getter:MethodHandle

the getter handle for the field

setter:MethodHandle

the setter handle for the field

Method Detail

wrapGetterback to summary
protected static MethodHandle wrapGetter(MethodHandle getter, RubyClass realClass, Class<?> basetype)
wrapSetterback to summary
protected MethodHandle wrapSetter(MethodHandle setter)

Overrides org.jruby.runtime.ivars.FieldVariableAccessor.wrapSetter.

Annotations
@Override
wrapSetterback to summary
protected static MethodHandle wrapSetter(MethodHandle setter, RubyClass realClass, boolean unwrap, Class<?> toJava, Class<?> basetype)