// Subclasses of Java classes can safely use ivars, so we set this to silence warnings
rubySubclass.setCacheProxy(true);
RubyClass subclassSingleton = rubySubclass.getSingletonClass();
subclassSingleton.addReadWriteAttribute(context, "java_proxy_class");
subclassSingleton.addMethod("java_interfaces", new JavaMethodZero(subclassSingleton, PUBLIC) {
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) {
IRubyObject javaInterfaces = self.getInstanceVariables().getInstanceVariable("@java_interfaces");
if (javaInterfaces != null) return javaInterfaces.dup();
return context.runtime.getNil();