本文整理了Java中org.jruby.RubyModule.getConstantMap
方法的一些代码示例,展示了RubyModule.getConstantMap
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyModule.getConstantMap
方法的具体详情如下:
包路径:org.jruby.RubyModule
类名称:RubyModule
方法名:getConstantMap
暂无
代码示例来源:origin: org.jruby/jruby-complete
public void syncConstants(RubyModule other) {
if (other.getConstantMap() != Collections.EMPTY_MAP) {
getConstantMapForWrite().putAll(other.getConstantMap());
}
}
代码示例来源:origin: org.jruby/jruby-core
protected IRubyObject constantTableFetch(String name) {
ConstantEntry entry = getConstantMap().get(name);
if (entry == null) return null;
return entry.value;
}
代码示例来源:origin: org.jruby/jruby-complete
protected IRubyObject constantTableFetch(String name) {
ConstantEntry entry = getConstantMap().get(name);
if (entry == null) return null;
return entry.value;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public void syncConstants(RubyModule other) {
if (other.getConstantMap() != Collections.EMPTY_MAP) {
getConstantMapForWrite().putAll(other.getConstantMap());
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* @return a list of constant names that exists at time this was called
*/
public Collection<String> getConstantNames() {
return getConstantMap().keySet();
}
代码示例来源:origin: org.jruby/jruby-core
public void syncConstants(RubyModule other) {
if (other.getConstantMap() != Collections.EMPTY_MAP) {
getConstantMapForWrite().putAll(other.getConstantMap());
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
protected IRubyObject constantTableFetch(String name) {
ConstantEntry entry = getConstantMap().get(name);
if (entry == null) return null;
return entry.value;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private void setConstantVisibility(ThreadContext context, String name, boolean hidden) {
ConstantEntry entry = getConstantMap().get(name);
if (entry == null) {
throw context.runtime.newNameError("constant " + getName() + "::" + name + " not defined", name);
}
getConstantMapForWrite().put(name, new ConstantEntry(entry.value, hidden));
}
代码示例来源:origin: org.jruby/jruby-core
/**
* @return a list of constant names that exists at time this was called
*/
public Collection<String> getConstantNames() {
return getConstantMap().keySet();
}
代码示例来源:origin: org.jruby/jruby-complete
/**
* @return a list of constant names that exists at time this was called
*/
public Collection<String> getConstantNames() {
return getConstantMap().keySet();
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/**
* @return a list of constant names that exists at time this was called
*/
public Collection<String> getConstantNames() {
return getConstantMap().keySet();
}
代码示例来源:origin: org.jruby/jruby-complete
@Deprecated
public List<String> getStoredConstantNameList() {
return new ArrayList<String>(getConstantMap().keySet());
}
代码示例来源:origin: org.jruby/jruby-complete
public Collection<String> getConstantNames(boolean includePrivate) {
if (includePrivate) return getConstantNames();
if (getConstantMap().size() == 0) {
return Collections.EMPTY_SET;
}
HashSet<String> publicNames = new HashSet<String>(getConstantMap().size());
for (Map.Entry<String, ConstantEntry> entry : getConstantMap().entrySet()) {
if (entry.getValue().hidden) continue;
publicNames.add(entry.getKey());
}
return publicNames;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public Collection<String> getConstantNames(boolean includePrivate) {
if (includePrivate) return getConstantNames();
if (getConstantMap().size() == 0) {
return Collections.EMPTY_SET;
}
HashSet<String> publicNames = new HashSet<String>(getConstantMap().size());
for (Map.Entry<String, ConstantEntry> entry : getConstantMap().entrySet()) {
if (entry.getValue().hidden) continue;
publicNames.add(entry.getKey());
}
return publicNames;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private void invalidateConstantCacheForModuleInclusion(RubyModule module)
{
for (RubyModule mod : gatherModules(module)) {
for (String key : mod.getConstantMap().keySet()) {
invalidateConstantCache(key);
}
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private void invalidateConstantCacheForModuleInclusion(RubyModule module)
{
for (RubyModule mod : gatherModules(module)) {
for (String key : mod.getConstantMap().keySet()) {
invalidateConstantCache(key);
}
}
}
代码示例来源:origin: org.jruby/jruby-complete
public final void setConstantVisibility(Ruby runtime, String name, boolean hidden) {
ConstantEntry entry = getConstantMap().get(name);
if (entry == null) {
throw runtime.newNameError("constant " + getName() + "::" + name + " not defined", name);
}
storeConstant(name, entry.value, hidden);
}
代码示例来源:origin: org.jruby/jruby-core
public final void setConstantVisibility(Ruby runtime, String name, boolean hidden) {
ConstantEntry entry = getConstantMap().get(name);
if (entry == null) {
throw runtime.newNameError("constant " + getName() + "::" + name + " not defined", name);
}
storeConstant(name, entry.value, hidden);
}
代码示例来源:origin: org.jruby/jruby-complete
public void deprecateConstant(Ruby runtime, String name) {
ConstantEntry entry = getConstantMap().get(name);
if (entry == null) {
throw runtime.newNameError(str(runtime, "constant ", types(runtime, this), "::", ids(runtime, name), " not defined"), name);
}
storeConstant(name, entry.value, entry.hidden, true);
invalidateConstantCache(name);
}
代码示例来源:origin: org.jruby/jruby-core
public void deprecateConstant(Ruby runtime, String name) {
ConstantEntry entry = getConstantMap().get(name);
if (entry == null) {
throw runtime.newNameError(str(runtime, "constant ", types(runtime, this), "::", ids(runtime, name), " not defined"), name);
}
storeConstant(name, entry.value, entry.hidden, true);
invalidateConstantCache(name);
}
内容来源于网络,如有侵权,请联系作者删除!