@Override void install(final RubyModule proxy) { if ( Modifier.isPublic(field.getModifiers()) ) { proxy.addMethod(name, new InstanceFieldGetter(name, proxy, field)); } } }
@Override public final IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { try { return JavaUtil.convertJavaToUsableRubyObject(context.runtime, field.get(retrieveTarget(self))); } catch (IllegalAccessException ex) { return handleGetException(context.runtime, ex); } } }
Field field = ((InstanceFieldGetter) method).getField();
Field field = ((InstanceFieldGetter) method).getField();
@Override void install(final RubyModule proxy) { if ( Modifier.isPublic(field.getModifiers()) ) { proxy.addMethod(name, new InstanceFieldGetter(name, proxy, field)); } } }
@Override public final IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { try { return JavaUtil.convertJavaToUsableRubyObject(context.runtime, field.get(retrieveTarget(self))); } catch (IllegalAccessException ex) { return handleGetException(context.runtime, ex); } } }
void install(RubyModule proxy) { if (Modifier.isPublic(field.getModifiers())) { proxy.addMethod(name, new InstanceFieldGetter(name, proxy, field)); } } }
void install(RubyModule proxy) { if (Modifier.isPublic(field.getModifiers())) { proxy.addMethod(name, new InstanceFieldGetter(name, proxy, field)); } } }
if (asReader) module.addMethod(asName, new InstanceFieldGetter(key, module, field)); if (asWriter) { if (isFinal) {
if (asReader) module.addMethod(asName, new InstanceFieldGetter(key, module, field)); if (asWriter) { if (isFinal) {
target.addMethod(asName, new InstanceFieldGetter(fieldName, target, field));
target.addMethod(asName, new InstanceFieldGetter(fieldName, target, field));