本文整理了Java中org.jruby.RubyModule.define
方法的一些代码示例,展示了RubyModule.define
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyModule.define
方法的具体详情如下:
包路径:org.jruby.RubyModule
类名称:RubyModule
方法名:define
[英]rb_alias
[中]rb_别名
代码示例来源:origin: org.jruby/jruby-complete
public final boolean defineAnnotatedMethod(String name, List<JavaMethodDescriptor> methods, MethodFactory methodFactory) {
JavaMethodDescriptor desc = methods.get(0);
if (methods.size() == 1) {
return defineAnnotatedMethod(name, desc, methodFactory);
}
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, methods, name);
define(this, desc, name, dynamicMethod);
return true;
}
代码示例来源:origin: org.jruby/jruby-complete
public final boolean defineAnnotatedMethod(String name, JavaMethodDescriptor desc, MethodFactory methodFactory) {
JRubyMethod jrubyMethod = desc.anno;
if (jrubyMethod == null) return false;
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, desc, name);
define(this, desc, name, dynamicMethod);
return true;
}
代码示例来源:origin: org.jruby/jruby-core
public final boolean defineAnnotatedMethod(String name, List<JavaMethodDescriptor> methods, MethodFactory methodFactory) {
JavaMethodDescriptor desc = methods.get(0);
if (methods.size() == 1) {
return defineAnnotatedMethod(name, desc, methodFactory);
}
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, methods, name);
define(this, desc, name, dynamicMethod);
return true;
}
代码示例来源:origin: org.jruby/jruby-core
public final boolean defineAnnotatedMethod(String name, JavaMethodDescriptor desc, MethodFactory methodFactory) {
JRubyMethod jrubyMethod = desc.anno;
if (jrubyMethod == null) return false;
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, desc, name);
define(this, desc, name, dynamicMethod);
return true;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public boolean defineAnnotatedMethod(String name, List<JavaMethodDescriptor> methods, MethodFactory methodFactory) {
JavaMethodDescriptor desc = methods.get(0);
if (methods.size() == 1) {
return defineAnnotatedMethod(name, desc, methodFactory);
} else {
CompatVersion compatVersion = getRuntime().getInstanceConfig().getCompatVersion();
if (shouldBindMethod(compatVersion, desc.anno.compat())) {
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, methods);
define(this, desc, name, dynamicMethod);
return true;
}
return false;
}
}
代码示例来源:origin: org.jruby/jruby-complete
public final boolean defineAnnotatedMethod(Method method, MethodFactory methodFactory) {
JRubyMethod jrubyMethod = method.getAnnotation(JRubyMethod.class);
if (jrubyMethod == null) return false;
JavaMethodDescriptor desc = new JavaMethodDescriptor(method);
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, desc, method.getName());
define(this, desc, method.getName(), dynamicMethod);
return true;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public boolean defineAnnotatedMethod(String name, List<JavaMethodDescriptor> methods, MethodFactory methodFactory) {
JavaMethodDescriptor desc = methods.get(0);
if (methods.size() == 1) {
return defineAnnotatedMethod(name, desc, methodFactory);
} else {
CompatVersion compatVersion = getRuntime().getInstanceConfig().getCompatVersion();
if (shouldBindMethod(compatVersion, desc.anno.compat())) {
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, methods);
define(this, desc, name, dynamicMethod);
return true;
}
return false;
}
}
代码示例来源:origin: org.jruby/jruby-core
public final boolean defineAnnotatedMethod(Method method, MethodFactory methodFactory) {
JRubyMethod jrubyMethod = method.getAnnotation(JRubyMethod.class);
if (jrubyMethod == null) return false;
JavaMethodDescriptor desc = new JavaMethodDescriptor(method);
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, desc, method.getName());
define(this, desc, method.getName(), dynamicMethod);
return true;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public boolean defineAnnotatedMethod(Method method, MethodFactory methodFactory) {
JRubyMethod jrubyMethod = method.getAnnotation(JRubyMethod.class);
if (jrubyMethod == null) return false;
CompatVersion compatVersion = getRuntime().getInstanceConfig().getCompatVersion();
if (shouldBindMethod(compatVersion, jrubyMethod.compat())) {
JavaMethodDescriptor desc = new JavaMethodDescriptor(method);
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, desc);
define(this, desc, method.getName(), dynamicMethod);
return true;
}
return false;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public boolean defineAnnotatedMethod(Method method, MethodFactory methodFactory) {
JRubyMethod jrubyMethod = method.getAnnotation(JRubyMethod.class);
if (jrubyMethod == null) return false;
CompatVersion compatVersion = getRuntime().getInstanceConfig().getCompatVersion();
if (shouldBindMethod(compatVersion, jrubyMethod.compat())) {
JavaMethodDescriptor desc = new JavaMethodDescriptor(method);
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, desc);
define(this, desc, method.getName(), dynamicMethod);
return true;
}
return false;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public boolean defineAnnotatedMethod(String name, JavaMethodDescriptor desc, MethodFactory methodFactory) {
JRubyMethod jrubyMethod = desc.anno;
if (jrubyMethod == null) return false;
CompatVersion compatVersion = getRuntime().getInstanceConfig().getCompatVersion();
if (shouldBindMethod(compatVersion, jrubyMethod.compat())) {
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, desc);
define(this, desc, name, dynamicMethod);
return true;
}
return false;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public boolean defineAnnotatedMethod(String name, JavaMethodDescriptor desc, MethodFactory methodFactory) {
JRubyMethod jrubyMethod = desc.anno;
if (jrubyMethod == null) return false;
CompatVersion compatVersion = getRuntime().getInstanceConfig().getCompatVersion();
if (shouldBindMethod(compatVersion, jrubyMethod.compat())) {
DynamicMethod dynamicMethod = methodFactory.getAnnotatedMethod(this, desc);
define(this, desc, name, dynamicMethod);
return true;
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!