org.jruby.Ruby.isBootingCore()方法的使用及代码示例

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

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

Ruby.isBootingCore介绍

暂无

代码示例

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

public void addInvalidatorsAndFlush(List<Invalidator> invalidators) {
  // add this class's invalidators to the aggregate
  invalidators.add(methodInvalidator);
  // if we're not at boot time, don't bother fully clearing caches
  if (!runtime.isBootingCore()) cachedMethods.clear();
  Map<RubyClass, Object> subclasses = this.subclasses;
  // no subclasses, don't bother with lock and iteration
  if (subclasses == null || subclasses.isEmpty()) return;
  // cascade into subclasses
  for (RubyClass subclass : subclasses.keySet()) subclass.addInvalidatorsAndFlush(invalidators);
}

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

public void addInvalidatorsAndFlush(List<Invalidator> invalidators) {
  // add this class's invalidators to the aggregate
  invalidators.add(methodInvalidator);
  // if we're not at boot time, don't bother fully clearing caches
  if (!runtime.isBootingCore()) cachedMethods.clear();
  Map<RubyClass, Object> subclasses = this.subclasses;
  // no subclasses, don't bother with lock and iteration
  if (subclasses == null || subclasses.isEmpty()) return;
  // cascade into subclasses
  for (RubyClass subclass : subclasses.keySet()) subclass.addInvalidatorsAndFlush(invalidators);
}

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

protected void invalidateCoreClasses() {
  if (!getRuntime().isBootingCore()) {
    if (this == getRuntime().getFixnum()) {
      getRuntime().reopenFixnum();
    } else if (this == getRuntime().getFloat()) {
      getRuntime().reopenFloat();
    }
  }
}

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

protected void invalidateCoreClasses() {
  if (!getRuntime().isBootingCore()) {
    if (this == getRuntime().getFixnum()) {
      getRuntime().reopenFixnum();
    } else if (this == getRuntime().getFloat()) {
      getRuntime().reopenFloat();
    }
  }
}

相关文章

Ruby类方法