/** * Use code generation to provide a method handle based on an annotated Java * method. * * @see org.jruby.runtime.MethodFactory#getAnnotatedMethod */ public DynamicMethod getAnnotatedMethod(RubyModule implementationClass, JavaMethodDescriptor desc, String name) { String javaMethodName = desc.name; try { Class c = getAnnotatedMethodClass(Collections.singletonList(desc)); JavaMethod ic = constructJavaMethod(implementationClass, desc, name, c); TypePopulator.populateMethod( ic, Arity.fromAnnotation(desc.anno, desc.actualRequired).getValue(), javaMethodName, desc.isStatic, desc.anno.notImplemented(), desc.declaringClass, desc.name, desc.returnClass, desc.parameters); return ic; } catch(Exception e) { LOG.error(e); throw implementationClass.getRuntime().newLoadError(e.getMessage()); } }
/** * Use code generation to provide a method handle based on an annotated Java * method. * * @see org.jruby.runtime.MethodFactory#getAnnotatedMethod */ public DynamicMethod getAnnotatedMethod(RubyModule implementationClass, JavaMethodDescriptor desc, String name) { String javaMethodName = desc.name; try { Class c = getAnnotatedMethodClass(Collections.singletonList(desc)); JavaMethod ic = constructJavaMethod(implementationClass, desc, name, c); TypePopulator.populateMethod( ic, Arity.fromAnnotation(desc.anno, desc.actualRequired).getValue(), javaMethodName, desc.isStatic, desc.anno.notImplemented(), desc.declaringClass, desc.name, desc.returnClass, desc.parameters); return ic; } catch(Exception e) { LOG.error(e); throw implementationClass.getRuntime().newLoadError(e.getMessage()); } }
if (DEBUG) LOG.debug(" min: " + info.getMin() + ", max: " + info.getMax()); JavaMethod ic = constructJavaMethod(implementationClass, desc1, name, c);
if (DEBUG) LOG.debug(" min: " + info.getMin() + ", max: " + info.getMax()); JavaMethod ic = constructJavaMethod(implementationClass, desc1, name, c);