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

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

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

RubyModule.getDelegate介绍

暂无

代码示例

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

@Override
protected boolean isSame(RubyModule module) {
  return origin.isSame(module.getDelegate());
}

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

@Override
protected boolean isSame(RubyModule module) {
  return origin.isSame(module.getDelegate());
}

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

/**
 * Gather all modules that would be included by including the given module.
 * The resulting list contains the given module and its (zero or more)
 * module-wrapping superclasses.
 *
 * @param baseModule The base module from which to aggregate modules
 * @return A list of all modules that would be included by including the given module
 */
private List<RubyModule> gatherModules(RubyModule baseModule) {
  // build a list of all modules to consider for inclusion
  List<RubyModule> modulesToInclude = new ArrayList<RubyModule>();
  while (baseModule != null) {
    modulesToInclude.add(baseModule.getDelegate());
    baseModule = baseModule.getSuperClass();
  }
  return modulesToInclude;
}

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

/**
 * Gather all modules that would be included by including the given module.
 * The resulting list contains the given module and its (zero or more)
 * module-wrapping superclasses.
 *
 * @param baseModule The base module from which to aggregate modules
 * @return A list of all modules that would be included by including the given module
 */
private List<RubyModule> gatherModules(RubyModule baseModule) {
  // build a list of all modules to consider for inclusion
  List<RubyModule> modulesToInclude = new ArrayList<RubyModule>();
  while (baseModule != null) {
    modulesToInclude.add(baseModule.getDelegate());
    baseModule = baseModule.getSuperClass();
  }
  return modulesToInclude;
}

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

public List<IRubyObject> getAncestorList() {
  ArrayList<IRubyObject> list = new ArrayList<IRubyObject>();
  for (RubyModule module = this; module != null; module = module.getSuperClass()) {
    // FIXME this is silly. figure out how to delegate the getNonIncludedClass()
    // call to drop the getDelegate().
    if (module.methodLocation == module) list.add(module.getDelegate().getNonIncludedClass());
  }
  return list;
}

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

public List<IRubyObject> getAncestorList() {
  ArrayList<IRubyObject> list = new ArrayList<IRubyObject>();
  for (RubyModule module = this; module != null; module = module.getSuperClass()) {
    // FIXME this is silly. figure out how to delegate the getNonIncludedClass()
    // call to drop the getDelegate().
    if (module.methodLocation == module) list.add(module.getDelegate().getNonIncludedClass());
  }
  return list;
}

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

if (nextClass.isIncluded()) {
    if (nextClass.getDelegate() == nextModule.getDelegate()) {
currentInclusionPoint = proceedWithInclude(currentInclusionPoint, nextModule.getDelegate());

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

if (nextClass.isIncluded()) {
    if (nextClass.getDelegate() == nextModule.getDelegate()) {
currentInclusionPoint = proceedWithInclude(currentInclusionPoint, nextModule.getDelegate());

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

if (nextClass.isIncluded()) {
    if (nextClass.getDelegate() == nextModule.getDelegate()) {
currentInclusionPoint = proceedWithPrepend(currentInclusionPoint, nextModule.getDelegate());

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

if (nextClass.isIncluded()) {
    if (nextClass.getDelegate() == nextModule.getDelegate()) {
currentInclusionPoint = proceedWithPrepend(currentInclusionPoint, nextModule.getDelegate());

相关文章

微信公众号

最新文章

更多

RubyModule类方法