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