@Deprecated public void init(RubyModule implementationClass, Arity arity, Visibility visibility, StaticScope staticScope, CallConfiguration callConfig) { init(implementationClass, arity, visibility, staticScope); }
protected static void checkArgumentCount(JavaMethod method, ThreadContext context, String name, IRubyObject[] args, int num) { if (args.length != num) raiseArgumentError(method, context, name, args.length, num, num); }
public static void populateMethod(JavaMethod javaMethod, int arity, String simpleName, boolean isStatic, CallConfiguration callConfig, boolean notImplemented, Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeArguments) { javaMethod.setIsBuiltin(true); javaMethod.setArity(Arity.createArity(arity)); javaMethod.setJavaName(simpleName); javaMethod.setSingleton(isStatic); javaMethod.setCallConfig(callConfig); javaMethod.setNotImplemented(notImplemented); javaMethod.setNativeCall(nativeTarget, nativeName, nativeReturn, nativeArguments, isStatic, false); }
/** * Use code generation to provide a method handle based on an annotated Java * method. * * @see org.jruby.runtime.MethodFactory#getAnnotatedMethod */ public void prepareAnnotatedMethod(RubyModule implementationClass, JavaMethod javaMethod, JavaMethodDescriptor desc) { String javaMethodName = desc.name; javaMethod.setArity(Arity.fromAnnotation(desc.anno, desc.actualRequired)); javaMethod.setJavaName(javaMethodName); javaMethod.setSingleton(desc.isStatic); javaMethod.setCallConfig(CallConfiguration.getCallConfigByAnno(desc.anno)); }
protected final void callTrace(ThreadContext context, boolean enabled, String name) { if (enabled) context.trace(RubyEvent.C_CALL, name, getImplementationClass()); }
/** * @see NativeCallMethod#setNativeCall(Class, String, Class, Class[], boolean) */ public void setNativeCall(Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeSignature, boolean statik) { setNativeCall(nativeTarget, nativeName, nativeReturn, nativeSignature, statik, false); }
public void init(RubyModule implementationClass, Arity arity, Visibility visibility, StaticScope staticScope) { this.staticScope = staticScope; setArity(arity); super.init(implementationClass, visibility); }
public static DynamicMethod populateModuleMethod(RubyModule cls, JavaMethod javaMethod) { DynamicMethod moduleMethod = javaMethod.dup(); moduleMethod.setImplementationClass(cls.getSingletonClass()); moduleMethod.setVisibility(Visibility.PUBLIC); return moduleMethod; }
/** * Use code generation to provide a method handle based on an annotated Java * method. * * @see org.jruby.runtime.MethodFactory#getAnnotatedMethod */ public void prepareAnnotatedMethod(RubyModule implementationClass, JavaMethod javaMethod, JavaMethodDescriptor desc) { String javaMethodName = desc.name; javaMethod.setArity(Arity.fromAnnotation(desc.anno, desc.actualRequired)); javaMethod.setJavaName(javaMethodName); javaMethod.setSingleton(desc.isStatic); javaMethod.setCallConfig(CallConfiguration.getCallConfigByAnno(desc.anno)); }
protected final void returnTraceCompiled(ThreadContext context, boolean enabled, String name) { if (enabled) context.trace(RubyEvent.RETURN, name, getImplementationClass()); }
/** * @see NativeCallMethod#setNativeCall(Class, String, Class, Class[], boolean) */ public void setNativeCall(Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeSignature, boolean statik) { setNativeCall(nativeTarget, nativeName, nativeReturn, nativeSignature, statik, false); }
public void init(RubyModule implementationClass, Arity arity, Visibility visibility, StaticScope staticScope) { this.staticScope = staticScope; setArity(arity); super.init(implementationClass, visibility); }
public static DynamicMethod populateModuleMethod(RubyModule cls, JavaMethod javaMethod) { DynamicMethod moduleMethod = javaMethod.dup(); moduleMethod.setImplementationClass(cls.getSingletonClass()); moduleMethod.setVisibility(Visibility.PUBLIC); return moduleMethod; }
public static void populateMethod(JavaMethod javaMethod, int arity, String simpleName, boolean isStatic, CallConfiguration callConfig, boolean notImplemented, Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeArguments) { javaMethod.setIsBuiltin(true); javaMethod.setArity(Arity.createArity(arity)); javaMethod.setJavaName(simpleName); javaMethod.setSingleton(isStatic); javaMethod.setCallConfig(callConfig); javaMethod.setNotImplemented(notImplemented); javaMethod.setNativeCall(nativeTarget, nativeName, nativeReturn, nativeArguments, isStatic, false); }
protected final void callTrace(ThreadContext context, boolean enabled, String name) { if (enabled) context.trace(RubyEvent.C_CALL, name, getImplementationClass()); }
@Deprecated public void init(RubyModule implementationClass, Arity arity, Visibility visibility, StaticScope staticScope, CallConfiguration callConfig) { init(implementationClass, arity, visibility, staticScope); }
protected static void checkArgumentCount(JavaMethod method, ThreadContext context, String name, IRubyObject[] args, int num) { if (args.length != num) raiseArgumentError(method, context, name, args.length, num, num); }
public static void populateMethod(JavaMethod javaMethod, int arity, String simpleName, boolean isStatic, boolean notImplemented, Class nativeTarget, String nativeName, Class nativeReturn, Class[] nativeArguments) { javaMethod.setIsBuiltin(true); javaMethod.setArity(Arity.createArity(arity)); javaMethod.setJavaName(simpleName); javaMethod.setSingleton(isStatic); javaMethod.setNotImplemented(notImplemented); javaMethod.setNativeCall(nativeTarget, nativeName, nativeReturn, nativeArguments, isStatic, false); }
protected final void returnTrace(ThreadContext context, boolean enabled, String name) { if (enabled) context.trace(RubyEvent.C_RETURN, name, getImplementationClass()); }
protected void init( RubyModule implementationClass, Arity arity, Visibility visibility, StaticScope staticScope, Object scriptObject, CallConfiguration callConfig, ISourcePosition position, String parameterDesc) { this.$scriptObject = scriptObject; this.position = position; setParameterDesc(parameterDesc); super.init(implementationClass, arity, visibility, staticScope, callConfig); }