本文整理了Java中org.jruby.Ruby.getStaticScopeFactory
方法的一些代码示例,展示了Ruby.getStaticScopeFactory
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getStaticScopeFactory
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getStaticScopeFactory
暂无
代码示例来源:origin: org.jruby/jruby-complete
private CallBlock(Signature signature, BlockCallback callback, ThreadContext context) {
super(signature);
this.callback = callback;
this.dummyScope = context.runtime.getStaticScopeFactory().getDummyScope();
}
代码示例来源:origin: org.jruby/jruby-complete
public CallBlock19(Signature signature, BlockCallback callback, ThreadContext context) {
super(signature);
this.callback = callback;
this.dummy = context.runtime.getStaticScopeFactory().getDummyScope();
}
代码示例来源:origin: org.jruby/jruby-core
private CallBlock(Signature signature, BlockCallback callback, ThreadContext context) {
super(signature);
this.callback = callback;
this.dummyScope = context.runtime.getStaticScopeFactory().getDummyScope();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private CallBlock(Arity arity, BlockCallback callback, ThreadContext context) {
super(BlockBody.SINGLE_RESTARG);
this.arity = arity;
this.callback = callback;
this.dummyScope = context.runtime.getStaticScopeFactory().getDummyScope();
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private CallBlock(Arity arity, BlockCallback callback, ThreadContext context) {
super(BlockBody.SINGLE_RESTARG);
this.arity = arity;
this.callback = callback;
this.dummyScope = context.runtime.getStaticScopeFactory().getDummyScope();
}
代码示例来源:origin: org.jruby/jruby-complete
/**
* For blocks which cannot be executed in parallel.
*/
public JavaInternalBlockBody(Ruby runtime, ThreadContext originalContext, String methodName, Signature signature) {
super(signature);
this.originalContext = originalContext;
this.methodName = methodName;
this.dummyScope = runtime.getStaticScopeFactory().getDummyScope();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
/**
* For blocks which cannot be executed in parallel.
* @param methodName
* @param arity
*/
public JavaInternalBlockBody(Ruby runtime, ThreadContext originalContext, String methodName, Arity arity) {
super(BlockBody.SINGLE_RESTARG);
this.arity = arity;
this.originalContext = originalContext;
this.methodName = methodName;
this.dummyScope = runtime.getStaticScopeFactory().getDummyScope();
}
代码示例来源:origin: org.jruby/jruby-complete
@SuppressWarnings("deprecation")
public static StaticScope preLoad(ThreadContext context, String[] varNames) {
StaticScope staticScope = context.runtime.getStaticScopeFactory().newLocalScope(null, varNames);
preLoadCommon(context, staticScope, false);
return staticScope;
}
代码示例来源:origin: org.jruby/jruby-core
@SuppressWarnings("deprecation")
public static StaticScope preLoad(ThreadContext context, String[] varNames) {
StaticScope staticScope = context.runtime.getStaticScopeFactory().newLocalScope(null, varNames);
preLoadCommon(context, staticScope, false);
return staticScope;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public static StaticScope preLoad(ThreadContext context, String[] varNames) {
StaticScope staticScope = context.runtime.getStaticScopeFactory().newLocalScope(null, varNames);
preLoadCommon(context, staticScope, false);
return staticScope;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
public static StaticScope preLoad(ThreadContext context, String[] varNames) {
StaticScope staticScope = context.runtime.getStaticScopeFactory().newLocalScope(null, varNames);
preLoadCommon(context, staticScope, false);
return staticScope;
}
代码示例来源:origin: org.jruby/jruby-core
public void preBsfApply(String[] names) {
// FIXME: I think we need these pushed somewhere?
StaticScope staticScope = runtime.getStaticScopeFactory().newLocalScope(null);
staticScope.setVariables(names);
pushFrame();
}
代码示例来源:origin: org.jruby/jruby-core
public final DynamicScope getEvalScope(Ruby runtime) {
// We create one extra dynamicScope on a binding so that when we 'eval "b=1", binding' the
// 'b' will get put into this new dynamic scope. The original scope does not see the new
// 'b' and successive evals with this binding will. Note: This only happens for explicit
// bindings. Implicit bindings will always dispose of the scope they create.
// No eval scope set, so we create one
if (evalScopeBinding.evalScope == null) {
// bindings scopes must always be ManyVars scopes since evals can grow them
evalScopeBinding.evalScope = new ManyVarsDynamicScope(runtime.getStaticScopeFactory().newEvalScope(dynamicScope.getStaticScope()), dynamicScope);
}
return evalScopeBinding.evalScope;
}
代码示例来源:origin: org.jruby/jruby-complete
public final DynamicScope getEvalScope(Ruby runtime) {
// We create one extra dynamicScope on a binding so that when we 'eval "b=1", binding' the
// 'b' will get put into this new dynamic scope. The original scope does not see the new
// 'b' and successive evals with this binding will. Note: This only happens for explicit
// bindings. Implicit bindings will always dispose of the scope they create.
// No eval scope set, so we create one
if (evalScopeBinding.evalScope == null) {
// bindings scopes must always be ManyVars scopes since evals can grow them
evalScopeBinding.evalScope = new ManyVarsDynamicScope(runtime.getStaticScopeFactory().newEvalScope(dynamicScope.getStaticScope()), dynamicScope);
}
return evalScopeBinding.evalScope;
}
代码示例来源:origin: org.jruby/jruby-complete
public void preBsfApply(String[] names) {
// FIXME: I think we need these pushed somewhere?
StaticScope staticScope = runtime.getStaticScopeFactory().newLocalScope(null);
staticScope.setVariables(names);
pushFrame();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
public void preBsfApply(String[] names) {
// FIXME: I think we need these pushed somewhere?
StaticScope staticScope = runtime.getStaticScopeFactory().newLocalScope(null);
staticScope.setVariables(names);
pushFrame();
}
代码示例来源:origin: org.jruby/jruby-complete
public void pushLocalScope() {
currentScope = configuration.getRuntime().getStaticScopeFactory().newLocalScope(currentScope, lexer.getFile());
currentScope.setCommandArgumentStack(lexer.getCmdArgumentState().getStack());
lexer.getCmdArgumentState().reset(0);
}
代码示例来源:origin: org.jruby/jruby-core
public void pushLocalScope() {
currentScope = configuration.getRuntime().getStaticScopeFactory().newLocalScope(currentScope, lexer.getFile());
currentScope.setCommandArgumentStack(lexer.getCmdArgumentState().getStack());
lexer.getCmdArgumentState().reset(0);
}
代码示例来源:origin: org.jruby/jruby-complete
public void preExecuteUnder(IRubyObject executeUnderObj, RubyModule executeUnderClass, Block block) {
Frame frame = getCurrentFrame();
DynamicScope scope = getCurrentScope();
StaticScope sScope = runtime.getStaticScopeFactory().newBlockScope(scope.getStaticScope());
sScope.setModule(executeUnderClass);
pushScope(DynamicScope.newDynamicScope(sScope, scope));
pushCallFrame(frame.getKlazz(), frame.getName(), executeUnderObj, block);
getCurrentFrame().setVisibility(getPreviousFrame().getVisibility());
}
代码示例来源:origin: org.jruby/jruby-core
public void preExecuteUnder(IRubyObject executeUnderObj, RubyModule executeUnderClass, Block block) {
Frame frame = getCurrentFrame();
DynamicScope scope = getCurrentScope();
StaticScope sScope = runtime.getStaticScopeFactory().newBlockScope(scope.getStaticScope());
sScope.setModule(executeUnderClass);
pushScope(DynamicScope.newDynamicScope(sScope, scope));
pushCallFrame(frame.getKlazz(), frame.getName(), executeUnderObj, block);
getCurrentFrame().setVisibility(getPreviousFrame().getVisibility());
}
内容来源于网络,如有侵权,请联系作者删除!