本文整理了Java中org.jruby.RubyModule.isSame
方法的一些代码示例,展示了RubyModule.isSame
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyModule.isSame
方法的具体详情如下:
包路径:org.jruby.RubyModule
类名称:RubyModule
方法名:isSame
暂无
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
protected boolean isSame(RubyModule module) {
return delegate.isSame(module);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
protected boolean isSame(RubyModule module) {
return delegate.isSame(module);
}
代码示例来源:origin: org.jruby/jruby-core
/**
* Find the given class in this hierarchy, considering modules along the way.
*
* @param clazz the class to find
* @return The method, or UndefinedMethod if not found
*/
public RubyModule findImplementer(RubyModule clazz) {
for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if (module.isSame(clazz)) return module;
}
return null;
}
代码示例来源:origin: org.jruby/jruby-complete
/**
* Find the given class in this hierarchy, considering modules along the way.
*
* @param clazz the class to find
* @return The method, or UndefinedMethod if not found
*/
public RubyModule findImplementer(RubyModule clazz) {
for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if (module.isSame(clazz)) return module;
}
return null;
}
代码示例来源:origin: org.jruby/jruby-complete
public boolean isKindOfModule(RubyModule type) {
for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if (module.isSame(type)) return true;
}
return false;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public boolean isKindOfModule(RubyModule type) {
for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if (module.isSame(type)) return true;
}
return false;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Find the given class in this hierarchy, considering modules along the way.
*
* @param clazz the class to find
* @return The method, or UndefinedMethod if not found
*/
public RubyModule findImplementer(RubyModule clazz) {
for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if (module.isSame(clazz)) return module;
}
return null;
}
代码示例来源:origin: org.jruby/jruby-core
public boolean isKindOfModule(RubyModule type) {
for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if (module.isSame(type)) return true;
}
return false;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public boolean isKindOfModule(RubyModule type) {
for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if (module.isSame(type)) return true;
}
return false;
}
代码示例来源:origin: org.jruby/jruby-complete
@Override
protected boolean isSame(RubyModule module) {
return origin.isSame(module.getDelegate());
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Find the given class in this hierarchy, considering modules along the way.
*
* @param clazz the class to find
* @return The method, or UndefinedMethod if not found
*/
public RubyModule findImplementer(RubyModule clazz) {
for (RubyModule module = this; module != null; module = module.getSuperClass()) {
if (module.isSame(clazz)) return module;
}
return null;
}
代码示例来源:origin: org.jruby/jruby-core
@Override
protected boolean isSame(RubyModule module) {
return origin.isSame(module.getDelegate());
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "==", required = 1)
@Override
public IRubyObject op_equal(ThreadContext context, IRubyObject other) {
if(!(other instanceof RubyModule)) return context.fals;
RubyModule otherModule = (RubyModule) other;
if(otherModule.isIncluded()) {
return context.runtime.newBoolean(otherModule.isSame(this));
} else {
return context.runtime.newBoolean(isSame(otherModule));
}
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = "==", required = 1)
@Override
public IRubyObject op_equal(ThreadContext context, IRubyObject other) {
if(!(other instanceof RubyModule)) return context.fals;
RubyModule otherModule = (RubyModule) other;
if(otherModule.isIncluded()) {
return context.runtime.newBoolean(otherModule.isSame(this));
} else {
return context.runtime.newBoolean(isSame(otherModule));
}
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "include?", required = 1)
public IRubyObject include_p(ThreadContext context, IRubyObject arg) {
if (!arg.isModule()) {
throw context.runtime.newTypeError(arg, context.runtime.getModule());
}
RubyModule moduleToCompare = (RubyModule) arg;
// See if module is in chain...Cannot match against itself so start at superClass.
for (RubyModule p = getSuperClass(); p != null; p = p.getSuperClass()) {
if (p.isSame(moduleToCompare)) {
return context.tru;
}
}
return context.fals;
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = "include?", required = 1)
public IRubyObject include_p(ThreadContext context, IRubyObject arg) {
if (!arg.isModule()) {
throw context.runtime.newTypeError(arg, context.runtime.getModule());
}
RubyModule moduleToCompare = (RubyModule) arg;
// See if module is in chain...Cannot match against itself so start at superClass.
for (RubyModule p = getSuperClass(); p != null; p = p.getSuperClass()) {
if (p.isSame(moduleToCompare)) {
return context.tru;
}
}
return context.fals;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "include?", required = 1)
public IRubyObject include_p(ThreadContext context, IRubyObject arg) {
if (!arg.isModule()) {
throw context.runtime.newTypeError(arg, context.runtime.getModule());
}
RubyModule moduleToCompare = (RubyModule) arg;
// See if module is in chain...Cannot match against itself so start at superClass.
for (RubyModule p = getSuperClass(); p != null; p = p.getSuperClass()) {
if (p.isSame(moduleToCompare)) {
return context.runtime.getTrue();
}
}
return context.runtime.getFalse();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "include?", required = 1)
public IRubyObject include_p(ThreadContext context, IRubyObject arg) {
if (!arg.isModule()) {
throw context.runtime.newTypeError(arg, context.runtime.getModule());
}
RubyModule moduleToCompare = (RubyModule) arg;
// See if module is in chain...Cannot match against itself so start at superClass.
for (RubyModule p = getSuperClass(); p != null; p = p.getSuperClass()) {
if (p.isSame(moduleToCompare)) {
return context.runtime.getTrue();
}
}
return context.runtime.getFalse();
}
内容来源于网络,如有侵权,请联系作者删除!