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

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

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

RubyModule.getAutoloadConstant介绍

[英]Get autoload constant. If it's first resolution for the constant, it tries to require the defined feature and returns the defined value. Multi-threaded accesses are blocked and processed sequentially except if the caller is the autoloading thread.
[中]获取自动加载常量。如果它是常数的第一个分辨率,它会尝试要求定义的特征并返回定义的值。多线程访问会被阻塞并按顺序处理,除非调用方是自动加载线程。

代码示例

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

/**
 * Get autoload constant.
 * If it's first resolution for the constant, it tries to require the defined feature and returns the defined value.
 * Multi-threaded accesses are blocked and processed sequentially except if the caller is the autoloading thread.
 */
public final IRubyObject getAutoloadConstant(String name) {
  return getAutoloadConstant(name, true);
}

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

@Override
protected IRubyObject getAutoloadConstant(String name, boolean forceLoad) {
  return origin.getAutoloadConstant(name, forceLoad);
}

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

@Override
public IRubyObject getAutoloadConstant(String name) {
  return delegate.getAutoloadConstant(name);
}

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

@Override
public IRubyObject getAutoloadConstant(String name) {
  return delegate.getAutoloadConstant(name);
}

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

@Override
protected IRubyObject getAutoloadConstant(String name, boolean forceLoad) {
  return origin.getAutoloadConstant(name, forceLoad);
}

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

/**
 * Get autoload constant.
 * If it's first resolution for the constant, it tries to require the defined feature and returns the defined value.
 * Multi-threaded accesses are blocked and processed sequentially except if the caller is the autoloading thread.
 */
public final IRubyObject getAutoloadConstant(String name) {
  return getAutoloadConstant(name, true);
}

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

public IRubyObject resolveUndefConstant(String name) {
  return getAutoloadConstant(name);
}

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

public IRubyObject resolveUndefConstant(String name) {
  return getAutoloadConstant(name);
}

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

public final IRubyObject resolveUndefConstant(String name) {
  return getAutoloadConstant(name);
}

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

public final IRubyObject resolveUndefConstant(String name) {
  return getAutoloadConstant(name);
}

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

private static IRubyObject iterateConstantNoConstMissing(String name,
  RubyModule init, boolean inherit, boolean loadConstant) {
  for (RubyModule mod = init; mod != null; mod = mod.getSuperClass()) {
    final IRubyObject value = mod.fetchConstant(name, true);
    if ( value == UNDEF ) return mod.getAutoloadConstant(name, loadConstant);
    if ( value != null ) return value;
    if ( ! inherit ) break;
  }
  return null;
}

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

private static IRubyObject iterateConstantNoConstMissing(String name,
  RubyModule init, boolean inherit, boolean loadConstant) {
  for (RubyModule mod = init; mod != null; mod = mod.getSuperClass()) {
    final IRubyObject value = mod.fetchConstant(name, true);
    if ( value == UNDEF ) return mod.getAutoloadConstant(name, loadConstant);
    if ( value != null ) return value;
    if ( ! inherit ) break;
  }
  return null;
}

相关文章

微信公众号

最新文章

更多

RubyModule类方法