本文整理了Java中org.jruby.RubyModule.getConstantAtSpecial
方法的一些代码示例,展示了RubyModule.getConstantAtSpecial
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyModule.getConstantAtSpecial
方法的具体详情如下:
包路径:org.jruby.RubyModule
类名称:RubyModule
方法名:getConstantAtSpecial
[英]This version searches superclasses if we're starting with Object. This corresponds to logic in rb_const_defined_0 that recurses for Object only.
[中]如果我们从Object开始,这个版本会搜索超类。这对应于rb_const_defined_0中仅针对对象递归的逻辑。
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/** this method should be used only by interpreter or compiler
*
*/
public RubyModule defineOrGetModuleUnder(String name) {
// This method is intended only for defining new modules in Ruby code
Ruby runtime = getRuntime();
IRubyObject moduleObj = getConstantAtSpecial(name);
RubyModule module;
if (moduleObj != null) {
if (!moduleObj.isModule()) throw runtime.newTypeError(name + " is not a module");
module = (RubyModule)moduleObj;
} else if (classProviders != null && (module = searchProvidersForModule(name)) != null) {
// reopen a java module
} else {
module = RubyModule.newModule(runtime, name, this, true);
}
return module;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/** this method should be used only by interpreter or compiler
*
*/
public RubyModule defineOrGetModuleUnder(String name) {
// This method is intended only for defining new modules in Ruby code
Ruby runtime = getRuntime();
IRubyObject moduleObj = getConstantAtSpecial(name);
RubyModule module;
if (moduleObj != null) {
if (!moduleObj.isModule()) throw runtime.newTypeError(name + " is not a module");
module = (RubyModule)moduleObj;
} else if (classProviders != null && (module = searchProvidersForModule(name)) != null) {
// reopen a java module
} else {
module = RubyModule.newModule(runtime, name, this, true);
}
return module;
}
代码示例来源:origin: org.jruby/jruby-complete
/** this method should be used only by interpreter or compiler
*
*/
public RubyModule defineOrGetModuleUnder(String name) {
// This method is intended only for defining new modules in Ruby code
Ruby runtime = getRuntime();
IRubyObject moduleObj = getConstantAtSpecial(name);
RubyModule module;
if (moduleObj != null) {
if (!moduleObj.isModule()) throw runtime.newTypeError(str(runtime, ids(runtime, name), " is not a module"));
module = (RubyModule)moduleObj;
} else if ((module = searchProvidersForModule(name)) != null) {
// reopen a java module
} else {
module = RubyModule.newModule(runtime, name, this, true);
}
return module;
}
代码示例来源:origin: org.jruby/jruby-core
/** this method should be used only by interpreter or compiler
*
*/
public RubyModule defineOrGetModuleUnder(String name) {
// This method is intended only for defining new modules in Ruby code
Ruby runtime = getRuntime();
IRubyObject moduleObj = getConstantAtSpecial(name);
RubyModule module;
if (moduleObj != null) {
if (!moduleObj.isModule()) throw runtime.newTypeError(str(runtime, ids(runtime, name), " is not a module"));
module = (RubyModule)moduleObj;
} else if ((module = searchProvidersForModule(name)) != null) {
// reopen a java module
} else {
module = RubyModule.newModule(runtime, name, this, true);
}
return module;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
IRubyObject classObj = getConstantAtSpecial(name);
RubyClass clazz;
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
IRubyObject classObj = getConstantAtSpecial(name);
RubyClass clazz;
代码示例来源:origin: org.jruby/jruby-complete
IRubyObject classObj = getConstantAtSpecial(name);
RubyClass clazz;
代码示例来源:origin: org.jruby/jruby-core
IRubyObject classObj = getConstantAtSpecial(name);
RubyClass clazz;
内容来源于网络,如有侵权,请联系作者删除!