org.jruby.RubyClass.getNonIncludedClass()方法的使用及代码示例

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

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

RubyClass.getNonIncludedClass介绍

暂无

代码示例

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

/**
 * Is the given class a wrapper for the specified module?
 * 
 * @param theClass The class to inspect
 * @param theModule The module we're looking for
 * @return true if the class is a wrapper for the module, false otherwise
 */
private boolean doesTheClassWrapTheModule(RubyClass theClass, RubyModule theModule) {
  return theClass.isIncluded() &&
      theClass.getNonIncludedClass() == theModule.getNonIncludedClass();
}

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

/**
 * Is the given class a wrapper for the specified module?
 * 
 * @param theClass The class to inspect
 * @param theModule The module we're looking for
 * @return true if the class is a wrapper for the module, false otherwise
 */
private boolean doesTheClassWrapTheModule(RubyClass theClass, RubyModule theModule) {
  return theClass.isIncluded() &&
      theClass.getNonIncludedClass() == theModule.getNonIncludedClass();
}

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

/** w_extended
 * 
 */
private RubyClass dumpExtended(RubyClass type) throws IOException {
  if(type.isSingleton()) {
    if (hasSingletonMethods(type) || type.hasVariables()) { // any ivars, since we don't have __attached__ ivar now
      throw type.getRuntime().newTypeError("singleton can't be dumped");
    }
    type = type.getSuperClass();
  }
  while(type.isIncluded()) {
    write('e');
    writeAndRegisterSymbol(RubySymbol.newSymbol(runtime, type.getNonIncludedClass().getName()).getBytes());
    type = type.getSuperClass();
  }
  return type;
}

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

/** w_extended
 * 
 */
private RubyClass dumpExtended(RubyClass type) throws IOException {
  if(type.isSingleton()) {
    if (hasSingletonMethods(type) || type.hasVariables()) { // any ivars, since we don't have __attached__ ivar now
      throw type.getRuntime().newTypeError("singleton can't be dumped");
    }
    type = type.getSuperClass();
  }
  while(type.isIncluded()) {
    write('e');
    writeAndRegisterSymbol(RubySymbol.newSymbol(runtime, type.getNonIncludedClass().getName()).getBytes());
    type = type.getSuperClass();
  }
  return type;
}

相关文章

微信公众号

最新文章

更多

RubyClass类方法