org.jruby.anno.JRubyMethod.compat()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(88)

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

JRubyMethod.compat介绍

暂无

代码示例

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

Map<String, List<JavaMethodDescriptor>> methodsHash = null;
if (desc.isStatic) {
  if (anno.compat() == RUBY1_8) {
    methodsHash = staticAnnotatedMethods1_8;
  } else if (anno.compat() == RUBY1_9) {
    methodsHash = staticAnnotatedMethods1_9;
  } else if (anno.compat() == RUBY2_0) {
    methodsHash = staticAnnotatedMethods2_0;
  } else {
  if (anno.compat() == RUBY1_8) {
    methodsHash = annotatedMethods1_8;
  } else if (anno.compat() == RUBY1_9) {
    methodsHash = annotatedMethods1_9;
  } else if (anno.compat() == RUBY2_0) {
    methodsHash = annotatedMethods2_0;
  } else {

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

Map<String, List<JavaMethodDescriptor>> methodsHash = null;
if (desc.isStatic) {
  if (anno.compat() == RUBY1_8) {
    methodsHash = staticAnnotatedMethods1_8;
  } else if (anno.compat() == RUBY1_9) {
    methodsHash = staticAnnotatedMethods1_9;
  } else if (anno.compat() == RUBY2_0) {
    methodsHash = staticAnnotatedMethods2_0;
  } else {
  if (anno.compat() == RUBY1_8) {
    methodsHash = annotatedMethods1_8;
  } else if (anno.compat() == RUBY1_9) {
    methodsHash = annotatedMethods1_9;
  } else if (anno.compat() == RUBY2_0) {
    methodsHash = annotatedMethods2_0;
  } else {

代码示例来源:origin: org.jruby/jruby-complete

if (anno.compat() == org.jruby.CompatVersion.RUBY1_8) continue;

代码示例来源:origin: org.jruby/jruby-core

if (anno.compat() == org.jruby.CompatVersion.RUBY1_8) continue;

代码示例来源: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: 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: org.jruby/jruby-core

if (anno.compat() == org.jruby.CompatVersion.RUBY1_8) continue;

代码示例来源: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-complete

if (anno.compat() == org.jruby.CompatVersion.RUBY1_8) continue;

代码示例来源: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: com.ning.billing/killbill-osgi-bundles-jruby

hasMeta |= anno.meta();
hasModule |= anno.module();
hasCompat |= anno.compat() != CompatVersion.BOTH;
Map<CharSequence, List<ExecutableElement>> methodsHash = null;
if (method.getModifiers().contains(Modifier.STATIC)) {
  if (anno.compat() == CompatVersion.RUBY1_8) {
    methodsHash = staticAnnotatedMethods1_8;
  } else if (anno.compat() == CompatVersion.RUBY1_9) {
    methodsHash = staticAnnotatedMethods1_9;
  } else if (anno.compat() == CompatVersion.RUBY2_0) {
    methodsHash = staticAnnotatedMethods2_0;
  } else {
  if (anno.compat() == CompatVersion.RUBY1_8) {
    methodsHash = annotatedMethods1_8;
  } else if (anno.compat() == CompatVersion.RUBY1_9) {
    methodsHash = annotatedMethods1_9;
  } else if (anno.compat() == CompatVersion.RUBY2_0) {
    methodsHash = annotatedMethods2_0;
  } else {

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

hasMeta |= anno.meta();
hasModule |= anno.module();
hasCompat |= anno.compat() != CompatVersion.BOTH;
Map<CharSequence, List<ExecutableElement>> methodsHash = null;
if (method.getModifiers().contains(Modifier.STATIC)) {
  if (anno.compat() == CompatVersion.RUBY1_8) {
    methodsHash = staticAnnotatedMethods1_8;
  } else if (anno.compat() == CompatVersion.RUBY1_9) {
    methodsHash = staticAnnotatedMethods1_9;
  } else if (anno.compat() == CompatVersion.RUBY2_0) {
    methodsHash = staticAnnotatedMethods2_0;
  } else {
  if (anno.compat() == CompatVersion.RUBY1_8) {
    methodsHash = annotatedMethods1_8;
  } else if (anno.compat() == CompatVersion.RUBY1_9) {
    methodsHash = annotatedMethods1_9;
  } else if (anno.compat() == CompatVersion.RUBY2_0) {
    methodsHash = annotatedMethods2_0;
  } else {

代码示例来源: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;
}

代码示例来源: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.jruby/jruby-complete

if (anno == null) continue;
if (anno.compat() == org.jruby.CompatVersion.RUBY1_8) continue;

代码示例来源:origin: org.jruby/jruby-core

if (anno == null) continue;
if (anno.compat() == org.jruby.CompatVersion.RUBY1_8) continue;

相关文章