本文整理了Java中org.jruby.RubyModule.calculateName
方法的一些代码示例,展示了RubyModule.calculateName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyModule.calculateName
方法的具体详情如下:
包路径:org.jruby.RubyModule
类名称:RubyModule
方法名:calculateName
[英]Recalculate the fully-qualified name of this class/module.
[中]重新计算此类/模块的完全限定名。
代码示例来源:origin: org.jruby/jruby-complete
/**
* Generate a fully-qualified class name or a #-style name for anonymous and singleton classes.
*
* Ruby C equivalent = "classname"
*
* @return The generated class name
*/
public String getName() {
if (cachedName != null) return cachedName;
return calculateName();
}
代码示例来源:origin: org.jruby/jruby-core
/**
* Generate a fully-qualified class name or a #-style name for anonymous and singleton classes.
*
* Ruby C equivalent = "classname"
*
* @return The generated class name
*/
public String getName() {
if (cachedName != null) return cachedName;
return calculateName();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* Generate a fully-qualified class name or a #-style name for anonymous and singleton classes.
*
* Ruby C equivalent = "classname"
*
* @return The generated class name
*/
public String getName() {
if (cachedName != null) return cachedName;
return calculateName();
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* Generate a fully-qualified class name or a #-style name for anonymous and singleton classes.
*
* Ruby C equivalent = "classname"
*
* @return The generated class name
*/
public String getName() {
if (cachedName != null) return cachedName;
return calculateName();
}
代码示例来源:origin: org.jruby/jruby-complete
private void setParentForModule(final String name, final IRubyObject value) {
// if adding a module under a constant name, set that module's basename to the constant name
if ( value instanceof RubyModule ) {
RubyModule module = (RubyModule) value;
if (module != this && module.getBaseName() == null) {
module.setBaseName(name);
module.setParent(this);
}
module.calculateName();
}
}
代码示例来源:origin: org.jruby/jruby-core
private void setParentForModule(final String name, final IRubyObject value) {
// if adding a module under a constant name, set that module's basename to the constant name
if ( value instanceof RubyModule ) {
RubyModule module = (RubyModule) value;
if (module != this && module.getBaseName() == null) {
module.setBaseName(name);
module.setParent(this);
}
module.calculateName();
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/** rb_mod_const_set
*
*/
@JRubyMethod(name = "const_set", required = 2)
public IRubyObject const_set(IRubyObject symbol, IRubyObject value) {
IRubyObject constant = setConstant(validateConstant(symbol.asJavaString()).intern(), value);
if (constant instanceof RubyModule) {
((RubyModule)constant).calculateName();
}
return constant;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/** rb_mod_const_set
*
*/
@JRubyMethod(name = "const_set", required = 2)
public IRubyObject const_set(IRubyObject symbol, IRubyObject value) {
IRubyObject constant = setConstant(validateConstant(symbol.asJavaString()).intern(), value);
if (constant instanceof RubyModule) {
((RubyModule)constant).calculateName();
}
return constant;
}
内容来源于网络,如有侵权,请联系作者删除!