|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.runtime.DynamicScope
public abstract class DynamicScope
Field Summary | |
---|---|
protected DynamicScope |
evalScope
|
protected DynamicScope |
parent
|
protected StaticScope |
staticScope
|
Constructor Summary | |
---|---|
protected |
DynamicScope(StaticScope staticScope)
|
protected |
DynamicScope(StaticScope staticScope,
DynamicScope parent)
|
Method Summary | |
---|---|
abstract DynamicScope |
cloneScope()
|
java.lang.String[] |
getAllNamesInScope()
Get all variable names captured (visible) by this scope (sans $~ and $_). |
abstract IRubyObject[] |
getArgValues()
Copy variable values back for ZSuper call. |
DynamicScope |
getEvalScope()
|
DynamicScope |
getFlipScope()
Find the scope to use for flip-flops. |
DynamicScope |
getNextCapturedScope()
Get next 'captured' scope. |
DynamicScope |
getNthParentScope(int n)
Returns the n-th parent scope of this scope. |
StaticScope |
getStaticScope()
Get the static scope associated with this DynamicScope. |
abstract IRubyObject |
getValue(int offset,
int depth)
Get value from current scope or one of its captured scopes. |
abstract IRubyObject |
getValueDepthZeroOrNil(int offset,
IRubyObject nil)
getValueOrNil for depth 0 |
abstract IRubyObject |
getValueOneDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 1, depth 0 |
abstract IRubyObject |
getValueOrNil(int offset,
int depth,
IRubyObject nil)
Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) |
abstract IRubyObject[] |
getValues()
|
abstract IRubyObject |
getValueThreeDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 3, depth 0 |
abstract IRubyObject |
getValueTwoDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 2, depth 0 |
abstract IRubyObject |
getValueZeroDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 0, depth 0 |
abstract void |
growIfNeeded()
|
static DynamicScope |
newDummyScope(StaticScope staticScope,
DynamicScope parent)
|
static DynamicScope |
newDynamicScope(StaticScope staticScope)
|
static DynamicScope |
newDynamicScope(StaticScope staticScope,
DynamicScope parent)
|
abstract void |
setArgValues(IRubyObject arg0)
|
abstract void |
setArgValues(IRubyObject[] values,
int size)
Set all values which represent 'normal' parameters in a call list to this dynamic scope. |
abstract void |
setArgValues(IRubyObject arg0,
IRubyObject arg1)
|
abstract void |
setArgValues(IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2)
|
abstract void |
setEndArgValues(IRubyObject[] values,
int index,
int size)
|
abstract IRubyObject |
setValue(int offset,
IRubyObject value,
int depth)
Set value in current dynamic scope or one of its captured scopes. |
IRubyObject |
setValue(IRubyObject value,
int offset,
int depth)
Set value in current dynamic scope or one of its captured scopes. |
abstract IRubyObject |
setValueDepthZero(IRubyObject value,
int offset)
setValue for depth zero |
abstract IRubyObject |
setValueOneDepthZero(IRubyObject value)
Set value one in this scope. |
abstract IRubyObject |
setValueThreeDepthZero(IRubyObject value)
Set value three in this scope. |
abstract IRubyObject |
setValueTwoDepthZero(IRubyObject value)
Set value two in this scope. |
abstract IRubyObject |
setValueZeroDepthZero(IRubyObject value)
Set value zero in this scope; |
java.lang.String |
toString()
|
abstract java.lang.String |
toString(java.lang.StringBuffer buf,
java.lang.String indent)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final StaticScope staticScope
protected final DynamicScope parent
protected DynamicScope evalScope
Constructor Detail |
---|
protected DynamicScope(StaticScope staticScope, DynamicScope parent)
protected DynamicScope(StaticScope staticScope)
Method Detail |
---|
public static DynamicScope newDynamicScope(StaticScope staticScope, DynamicScope parent)
public static DynamicScope newDummyScope(StaticScope staticScope, DynamicScope parent)
public DynamicScope getNthParentScope(int n)
null
.
n
- - number of levels above to look.
null
.public static DynamicScope newDynamicScope(StaticScope staticScope)
public final DynamicScope getEvalScope()
public DynamicScope getFlipScope()
public final DynamicScope getNextCapturedScope()
public final StaticScope getStaticScope()
public final java.lang.String[] getAllNamesInScope()
public java.lang.String toString()
toString
in class java.lang.Object
public abstract void growIfNeeded()
public abstract java.lang.String toString(java.lang.StringBuffer buf, java.lang.String indent)
public abstract DynamicScope cloneScope()
public abstract IRubyObject[] getValues()
public abstract IRubyObject getValue(int offset, int depth)
offset
- zero-indexed value that represents where variable livesdepth
- how many captured scopes down this variable should be set
public abstract IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil)
public abstract IRubyObject getValueDepthZeroOrNil(int offset, IRubyObject nil)
public abstract IRubyObject getValueZeroDepthZeroOrNil(IRubyObject nil)
public abstract IRubyObject getValueOneDepthZeroOrNil(IRubyObject nil)
public abstract IRubyObject getValueTwoDepthZeroOrNil(IRubyObject nil)
public abstract IRubyObject getValueThreeDepthZeroOrNil(IRubyObject nil)
public abstract IRubyObject setValue(int offset, IRubyObject value, int depth)
offset
- zero-indexed value that represents where variable livesvalue
- to setdepth
- how many captured scopes down this variable should be setpublic IRubyObject setValue(IRubyObject value, int offset, int depth)
offset
- zero-indexed value that represents where variable livesvalue
- to setdepth
- how many captured scopes down this variable should be setpublic abstract IRubyObject setValueDepthZero(IRubyObject value, int offset)
offset
- zero-indexed value that represents where variable livesvalue
- to setdepth
- how many captured scopes down this variable should be setpublic abstract IRubyObject setValueZeroDepthZero(IRubyObject value)
public abstract IRubyObject setValueOneDepthZero(IRubyObject value)
public abstract IRubyObject setValueTwoDepthZero(IRubyObject value)
public abstract IRubyObject setValueThreeDepthZero(IRubyObject value)
public abstract void setArgValues(IRubyObject[] values, int size)
values
- up to size specified to be mapped as ordinary parm valuessize
- is the number of values to assign as ordinary parm valuespublic abstract void setArgValues(IRubyObject arg0)
public abstract void setArgValues(IRubyObject arg0, IRubyObject arg1)
public abstract void setArgValues(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
public abstract void setEndArgValues(IRubyObject[] values, int index, int size)
values
- group where last n(size) values are usedindex
- index in the dynamic scope to start setting these valuessize
- which of the last size arguments of values parameter to setpublic abstract IRubyObject[] getArgValues()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |