本文整理了Java中org.jruby.RubyModule.getMethodLocation
方法的一些代码示例,展示了RubyModule.getMethodLocation
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyModule.getMethodLocation
方法的具体详情如下:
包路径:org.jruby.RubyModule
类名称:RubyModule
方法名:getMethodLocation
暂无
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
try {
return (IRubyObject) this.variable.invokeExact(context, staticScope, self, args, block, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
try {
return (IRubyObject) this.variable.invokeExact(context, staticScope, self, args, block, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) {
try {
return (IRubyObject) this.variable.invokeExact(context, staticScope, self, args, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
protected void addMethodSymbols(Ruby runtime, Set<String> seen, RubyArray ary, boolean not, Visibility visibility) {
// IncludedModuleWrapper needs to search prepended modules too, so search until we find methodLocation
RubyModule module = origin;
RubyModule methodLoc = origin.getMethodLocation();
for (; module != methodLoc; module = module.getSuperClass()) {
module.addMethodSymbols(runtime, seen, ary, not, visibility);
}
// one last add for method location
module.addMethodSymbols(runtime, seen, ary, not, visibility);
}
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) {
if (specificArity != 1) return call(context, self, clazz, name, new IRubyObject[]{arg0}, block);
try {
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, block, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) {
if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, block);
try {
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, block, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) {
if (specificArity != 1) return call(context, self, clazz, name, new IRubyObject[]{arg0}, Block.NULL_BLOCK);
try {
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) {
if (specificArity != 3) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2 }, Block.NULL_BLOCK);
try {
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) {
if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, Block.NULL_BLOCK);
try {
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) {
if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, block);
try {
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, block, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) {
if (specificArity != 3) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2 }, block);
try {
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, block, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
return null; // not reached
}
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) {
if (IRRuntimeHelpers.isDebug()) doDebug();
if (callCount >= 0) tryJit(context);
DynamicMethod jittedMethod = actualMethod;
if (jittedMethod != null) {
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, args, block);
}
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, args, block);
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) {
if (IRRuntimeHelpers.isDebug()) doDebug();
if (callCount >= 0) tryJit(context);
DynamicMethod jittedMethod = actualMethod;
if (jittedMethod != null) {
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, block);
}
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, block);
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) {
if (IRRuntimeHelpers.isDebug()) doDebug();
if (callCount >= 0) promoteToFullBuild(context);
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, block);
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) {
if (IRRuntimeHelpers.isDebug()) doDebug();
if (callCount >= 0) promoteToFullBuild(context);
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, block);
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) {
IRubyObject[] args = prepareArguments(context, self, currScope, currDynScope, temp);
Block block = prepareBlock(context, self, currScope, currDynScope, temp);
RubyModule definingModule = ((RubyModule) getDefiningModule().retrieve(context, self, currScope, currDynScope, temp)).getMethodLocation();
return IRRuntimeHelpers.instanceSuper(context, self, getId(), definingModule, args, block);
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) {
if (IRRuntimeHelpers.isDebug()) doDebug();
if (callCount >= 0) promoteToFullBuild(context);
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, block);
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) {
if (IRRuntimeHelpers.isDebug()) doDebug();
if (callCount >= 0) promoteToFullBuild(context);
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, Block.NULL_BLOCK);
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) {
if (IRRuntimeHelpers.isDebug()) doDebug();
if (callCount >= 0) promoteToFullBuild(context);
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, block);
}
代码示例来源:origin: org.jruby/jruby-complete
@Interp
public static IRubyObject instanceSuper(ThreadContext context, IRubyObject self, String id, RubyModule definingModule, IRubyObject[] args, Block block) {
RubyClass superClass = definingModule.getMethodLocation().getSuperClass();
DynamicMethod method = superClass != null ? superClass.searchMethod(id) : UndefinedMethod.INSTANCE;
IRubyObject rVal = method.isUndefined() ?
Helpers.callMethodMissing(context, self, method.getVisibility(), id, CallType.SUPER, args, block)
: method.call(context, self, superClass, id, args, block);
return rVal;
}
内容来源于网络,如有侵权,请联系作者删除!