public IRubyObject allocate(Ruby runtime, RubyClass klazz) { // if we haven't been here before, reify the class Class reifiedClass = klazz.getReifiedClass(); if (proxyConstructor == null || proxyConstructor.getDeclaringClass() != reifiedClass) { if (reifiedClass == null) { reifiedClass = Java.generateRealClass(klazz); } proxyConstructor = Java.getRealClassConstructor(runtime, reifiedClass); } IRubyObject newObj = Java.constructProxy(runtime, proxyConstructor, klazz); return newObj; } });
public IRubyObject allocate(Ruby runtime, RubyClass klazz) { // if we haven't been here before, reify the class Class reifiedClass = klazz.getReifiedClass(); if (proxyConstructor == null || proxyConstructor.getDeclaringClass() != reifiedClass) { if (reifiedClass == null) { reifiedClass = Java.generateRealClass(klazz); } proxyConstructor = Java.getRealClassConstructor(runtime, reifiedClass); } IRubyObject newObj = Java.constructProxy(runtime, proxyConstructor, klazz); return newObj; } });
public IRubyObject allocate(Ruby runtime, RubyClass klazz) { // if we haven't been here before, reify the class Class reifiedClass = klazz.getReifiedClass(); if (proxyConstructor == null || proxyConstructor.getDeclaringClass() != reifiedClass) { if (reifiedClass == null) { reifiedClass = Java.generateRealClass(klazz); } proxyConstructor = Java.getRealClassConstructor(runtime, reifiedClass); } IRubyObject newObj = Java.constructProxy(runtime, proxyConstructor, klazz); return newObj; } });
public IRubyObject allocate(Ruby runtime, RubyClass klazz) { // if we haven't been here before, reify the class Class reifiedClass = klazz.getReifiedClass(); if (proxyConstructor == null || proxyConstructor.getDeclaringClass() != reifiedClass) { if (reifiedClass == null) { reifiedClass = Java.generateRealClass(klazz); } proxyConstructor = Java.getRealClassConstructor(runtime, reifiedClass); } IRubyObject newObj = Java.constructProxy(runtime, proxyConstructor, klazz); return newObj; } });