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

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

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

RubyModule.setConstantCommon介绍

[英]Set the named constant on this module. Also, if the value provided is another Module and that module has not yet been named, assign it the specified name.
[中]在此模块上设置命名常量。此外,如果提供的值是另一个模块,且该模块尚未命名,请为其指定名称。

代码示例

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

/**
 * Set the named constant on this module. Also, if the value provided is another Module and
 * that module has not yet been named, assign it the specified name.
 *
 * @param name The name to assign
 * @param value The value to assign to it; if an unnamed Module, also set its basename to name
 * @return The result of setting the variable.
 */
public IRubyObject setConstant(String name, IRubyObject value) {
  return setConstantCommon(name, value, false, true);
}

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

/**
 * Set the named constant on this module. Also, if the value provided is another Module and
 * that module has not yet been named, assign it the specified name.
 *
 * @param name The name to assign
 * @param value The value to assign to it; if an unnamed Module, also set its basename to name
 * @return The result of setting the variable.
 */
public IRubyObject setConstant(String name, IRubyObject value) {
  return setConstantCommon(name, value, false, true);
}

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

/**
 * Set the named constant on this module. Also, if the value provided is another Module and
 * that module has not yet been named, assign it the specified name. This version does not
 * warn if the constant has already been set.
 *
 * @param name The name to assign
 * @param value The value to assign to it; if an unnamed Module, also set its basename to name
 * @return The result of setting the variable.
 */
public IRubyObject setConstantQuiet(String name, IRubyObject value) {
  return setConstantCommon(name, value, false);
}

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

/**
 * Set the named constant on this module. Also, if the value provided is another Module and
 * that module has not yet been named, assign it the specified name. This version does not
 * warn if the constant has already been set.
 *
 * @param name The name to assign
 * @param value The value to assign to it; if an unnamed Module, also set its basename to name
 * @return The result of setting the variable.
 */
public IRubyObject setConstantQuiet(String name, IRubyObject value) {
  return setConstantCommon(name, value, false, false);
}

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

/**
 * Set the named constant on this module. Also, if the value provided is another Module and
 * that module has not yet been named, assign it the specified name.
 *
 * @param name The name to assign
 * @param value The value to assign to it; if an unnamed Module, also set its basename to name
 * @return The result of setting the variable.
 */
public IRubyObject setConstant(String name, IRubyObject value) {
  return setConstantCommon(name, value, true);
}

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

/**
 * Set the named constant on this module. Also, if the value provided is another Module and
 * that module has not yet been named, assign it the specified name. This version does not
 * warn if the constant has already been set.
 *
 * @param name The name to assign
 * @param value The value to assign to it; if an unnamed Module, also set its basename to name
 * @return The result of setting the variable.
 */
public IRubyObject setConstantQuiet(String name, IRubyObject value) {
  return setConstantCommon(name, value, false);
}

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

/**
 * Set the named constant on this module. Also, if the value provided is another Module and
 * that module has not yet been named, assign it the specified name. This version does not
 * warn if the constant has already been set.
 *
 * @param name The name to assign
 * @param value The value to assign to it; if an unnamed Module, also set its basename to name
 * @return The result of setting the variable.
 */
public IRubyObject setConstantQuiet(String name, IRubyObject value) {
  return setConstantCommon(name, value, false, false);
}

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

/**
 * Set the named constant on this module. Also, if the value provided is another Module and
 * that module has not yet been named, assign it the specified name.
 *
 * @param name The name to assign
 * @param value The value to assign to it; if an unnamed Module, also set its basename to name
 * @return The result of setting the variable.
 */
public IRubyObject setConstant(String name, IRubyObject value) {
  return setConstantCommon(name, value, true);
}

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

public IRubyObject setConstant(String name, IRubyObject value, boolean hidden) {
  return setConstantCommon(name, value, hidden, true);
}

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

public IRubyObject setConstant(String name, IRubyObject value, boolean hidden) {
  return setConstantCommon(name, value, hidden, true);
}

相关文章

微信公众号

最新文章

更多

RubyModule类方法