org.jruby.RubyModule.define()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(104)

本文整理了Java中org.jruby.RubyModule.define方法的一些代码示例,展示了RubyModule.define的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyModule.define方法的具体详情如下:
包路径:org.jruby.RubyModule
类名称:RubyModule
方法名:define

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;
}

相关文章

微信公众号

最新文章

更多

RubyModule类方法