/** * Constructor for PartialDelegatingMethod. * @param visibility */ public PartialDelegatingMethod(RubyModule implementationClass, DynamicMethod method, Visibility visibility) { super(implementationClass, visibility, method.getName() ); this.method = method; }
@Override public String getName() { return delegate.getName(); //To change body of overridden methods use File | Settings | File Templates. }
/** * Constructor for PartialDelegatingMethod. * @param visibility */ public PartialDelegatingMethod(RubyModule implementationClass, DynamicMethod method, Visibility visibility) { super(implementationClass, visibility, method.getName() ); this.method = method; }
@Override public String getName() { return delegate.getName(); //To change body of overridden methods use File | Settings | File Templates. }
@Override public String getName() { return delegate.getName(); //To change body of overridden methods use File | Settings | File Templates. }
@Override public String getName() { return delegate.getName(); //To change body of overridden methods use File | Settings | File Templates. }
@Override public String getName() { return method.getName(); }
public MethodMissingMethod(DynamicMethod delegate, Visibility lastVisibility, CallType lastCallStatus) { super(delegate.getImplementationClass(), lastVisibility, delegate.getName()); this.delegate = delegate; this.lastCallStatus = lastCallStatus; this.lastVisibility = lastVisibility; }
public MethodMissingMethod(DynamicMethod delegate, Visibility lastVisibility, CallType lastCallStatus) { super(delegate.getImplementationClass(), lastVisibility, delegate.getName()); this.delegate = delegate; this.lastCallStatus = lastCallStatus; this.lastVisibility = lastVisibility; }
public DelegatingDynamicMethod(DynamicMethod delegate) { super(delegate.getImplementationClass(), delegate.getVisibility(), delegate.getName()); this.delegate = delegate; }
public DelegatingDynamicMethod(DynamicMethod delegate) { super(delegate.getImplementationClass(), delegate.getVisibility(), delegate.getName()); this.delegate = delegate; }
static String methodName(ProfiledMethod profileMethod) { final String displayName; if (profileMethod != null) { DynamicMethod method = profileMethod.getMethod(); String id = profileMethod.getName(); if (id == null) id = method.getName(); displayName = moduleHashMethod(method.getImplementationClass(), id.toString()); } else { displayName = "<unknown>"; } // System.out.printf("%d - %s\n", serial, displayName); return displayName; }
static String methodName(ProfiledMethod profileMethod) { final String displayName; if (profileMethod != null) { DynamicMethod method = profileMethod.getMethod(); String id = profileMethod.getName(); if (id == null) id = method.getName(); displayName = moduleHashMethod(method.getImplementationClass(), id.toString()); } else { displayName = "<unknown>"; } // System.out.printf("%d - %s\n", serial, displayName); return displayName; }
@JRubyMethod public IRubyObject original_name(ThreadContext context) { if (method instanceof AliasMethod) { return context.runtime.newSymbol(((AliasMethod) method).getOldName()); } return context.runtime.newSymbol(method.getName()); } }
@JRubyMethod public IRubyObject original_name(ThreadContext context) { if (method instanceof AliasMethod) { return context.runtime.newSymbol(((AliasMethod) method).getOldName()); } return context.runtime.newSymbol(method.getName()); } }
static String methodName(ProfiledMethod profileMethod) { final String displayName; if (profileMethod != null) { String name = profileMethod.getName(); DynamicMethod method = profileMethod.getMethod(); if (name == null) name = method.getName(); displayName = moduleHashMethod(method.getImplementationClass(), name); } else { displayName = "<unknown>"; } // System.out.printf("%d - %s\n", serial, displayName); return displayName; }
static String methodName(ProfiledMethod profileMethod) { final String displayName; if (profileMethod != null) { String name = profileMethod.getName(); DynamicMethod method = profileMethod.getMethod(); if (name == null) name = method.getName(); displayName = moduleHashMethod(method.getImplementationClass(), name); } else { displayName = "<unknown>"; } // System.out.printf("%d - %s\n", serial, displayName); return displayName; }
@Override public Object invoke(Object _this, Object... args) throws InvocationTargetException, IllegalAccessException { IRubyObject[] argList = new IRubyObject[args.length]; for (int i=0; i<args.length; i++) argList[i] = Java.getInstance(klass.getRuntime(),args[i]); return method.call(klass.getRuntime().getCurrentContext() , (IRubyObject)_this, klass, method.getName(), argList); } }
public static Block createMethodBlock(MethodBlockBody body) { RubyModule module = body.method.getImplementationClass(); Frame frame = new Frame(); frame.setKlazz(module); frame.setName(body.method.getName()); frame.setSelf(body.receiver); frame.setVisibility(body.method.getVisibility()); Binding binding = new Binding( frame, body.getStaticScope().getDummyScope(), body.method.getName(), body.getFile(), body.getLine()); return new Block(body, binding); }
public static Block createMethodBlock(MethodBlockBody body) { RubyModule module = body.method.getImplementationClass(); Frame frame = new Frame(); frame.setKlazz(module); frame.setName(body.method.getName()); frame.setSelf(body.receiver); frame.setVisibility(body.method.getVisibility()); Binding binding = new Binding( frame, body.getStaticScope().getDummyScope(), body.method.getName(), body.getFile(), body.getLine()); return new Block(body, binding); }