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

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

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

RubyModule.attr_reader介绍

[英]rb_mod_attr_reader
[中]rb_mod_attr_阅读器

代码示例

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

@Deprecated
public IRubyObject attr_reader(IRubyObject[] args) {
  return attr_reader(getRuntime().getCurrentContext(), args);
}

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

@Deprecated
public IRubyObject attr_reader(IRubyObject[] args) {
  return attr_reader(getRuntime().getCurrentContext(), args);
}

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

@Deprecated
public IRubyObject attr_reader(IRubyObject[] args) {
  return attr_reader(getRuntime().getCurrentContext(), args);
}

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

@Deprecated
public IRubyObject attr_reader(IRubyObject[] args) {
  return attr_reader(getRuntime().getCurrentContext(), args);
}

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

@JRubyMethod(name = "attr", rest = true, visibility = PRIVATE, reads = VISIBILITY, compat = RUBY1_9)
public IRubyObject attr19(ThreadContext context, IRubyObject[] args) {
  Ruby runtime = context.runtime;
  if (args.length == 2 && (args[1] == runtime.getTrue() || args[1] == runtime.getFalse())) {
    runtime.getWarnings().warn(ID.OBSOLETE_ARGUMENT, "optional boolean argument is obsoleted");
    addAccessor(context, args[0].asJavaString().intern(), context.getCurrentVisibility(), args[0].isTrue(), true);
    return runtime.getNil();
  }
  return attr_reader(context, args);
}

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

@JRubyMethod(name = "attr", rest = true, visibility = PRIVATE, reads = VISIBILITY, compat = RUBY1_9)
public IRubyObject attr19(ThreadContext context, IRubyObject[] args) {
  Ruby runtime = context.runtime;
  if (args.length == 2 && (args[1] == runtime.getTrue() || args[1] == runtime.getFalse())) {
    runtime.getWarnings().warn(ID.OBSOLETE_ARGUMENT, "optional boolean argument is obsoleted");
    addAccessor(context, args[0].asJavaString().intern(), context.getCurrentVisibility(), args[0].isTrue(), true);
    return runtime.getNil();
  }
  return attr_reader(context, args);
}

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

/** rb_mod_attr
 *
 */
@JRubyMethod(name = "attr", rest = true, reads = VISIBILITY)
public IRubyObject attr(ThreadContext context, IRubyObject[] args) {
  Ruby runtime = context.runtime;
  if (args.length == 2 && (args[1] == runtime.getTrue() || args[1] == runtime.getFalse())) {
    runtime.getWarnings().warn(ID.OBSOLETE_ARGUMENT, "optional boolean argument is obsoleted");
    addAccessor(context, TypeConverter.checkID(args[0]), context.getCurrentVisibility(), args[0].isTrue(), args[1].isTrue());
    return runtime.getNil();
  }
  return attr_reader(context, args);
}

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

/** rb_mod_attr
 *
 */
@JRubyMethod(name = "attr", rest = true, reads = VISIBILITY)
public IRubyObject attr(ThreadContext context, IRubyObject[] args) {
  Ruby runtime = context.runtime;
  if (args.length == 2 && (args[1] == runtime.getTrue() || args[1] == runtime.getFalse())) {
    runtime.getWarnings().warn(ID.OBSOLETE_ARGUMENT, "optional boolean argument is obsoleted");
    addAccessor(context, TypeConverter.checkID(args[0]), context.getCurrentVisibility(), args[0].isTrue(), args[1].isTrue());
    return runtime.getNil();
  }
  return attr_reader(context, args);
}

相关文章

微信公众号

最新文章

更多

RubyModule类方法