// not allowed for original (non-generated) Java classes
// note: not allowing for any previously created class right now;
// this restriction might be loosened later for generated classes
if ((javaClass.isTrue() && !clazz.getSingletonClass().isMethodBound("java_proxy_class", false)) ||
javaProxyClass.isTrue()) {
throw runtime.newArgumentError("can not add Java interface to existing Java class");
}
IRubyObject javaInterfaces = clazz.getInstanceVariables().fastGetInstanceVariable("@java_interfaces");
if (javaInterfaces == null) {
javaInterfaces = RubyArray.newArray(runtime, javaClassObj);