|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.runtime.DynamicScope
org.jruby.runtime.scope.NoVarsDynamicScope
org.jruby.runtime.scope.OneVarDynamicScope
org.jruby.runtime.scope.TwoVarDynamicScope
org.jruby.runtime.scope.ThreeVarDynamicScope
public class ThreeVarDynamicScope
This is a DynamicScope that supports exactly three variables.
| Field Summary | |
|---|---|
protected IRubyObject |
variableValueTwo
|
| Fields inherited from class org.jruby.runtime.scope.TwoVarDynamicScope |
|---|
variableValueOne |
| Fields inherited from class org.jruby.runtime.scope.OneVarDynamicScope |
|---|
variableValueZero |
| Fields inherited from class org.jruby.runtime.DynamicScope |
|---|
evalScope, parent, staticScope |
| Constructor Summary | |
|---|---|
ThreeVarDynamicScope(StaticScope staticScope)
|
|
ThreeVarDynamicScope(StaticScope staticScope,
DynamicScope parent)
|
|
| Method Summary | |
|---|---|
DynamicScope |
cloneScope()
|
IRubyObject[] |
getArgValues()
Copy variable values back for ZSuper call. |
IRubyObject |
getValue(int offset,
int depth)
Get value from current scope or one of its captured scopes. |
IRubyObject |
getValueDepthZeroOrNil(int offset,
IRubyObject nil)
getValueOrNil for depth 0 |
IRubyObject |
getValueOrNil(int offset,
int depth,
IRubyObject nil)
Variation of getValue that checks for nulls, returning and setting the given value (presumably nil) |
IRubyObject[] |
getValues()
|
IRubyObject |
getValueTwoDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 2, depth 0 |
void |
growIfNeeded()
|
void |
setArgValues(IRubyObject[] values,
int size)
Set all values which represent 'normal' parameters in a call list to this dynamic scope. |
IRubyObject |
setValue(int offset,
IRubyObject value,
int depth)
Set value in current dynamic scope or one of its captured scopes. |
IRubyObject |
setValueDepthZero(IRubyObject value,
int offset)
setValue for depth zero |
IRubyObject |
setValueTwoDepthZero(IRubyObject value)
Set value two in this scope. |
java.lang.String |
toString(java.lang.StringBuffer buf,
java.lang.String indent)
|
| Methods inherited from class org.jruby.runtime.scope.TwoVarDynamicScope |
|---|
getValueOneDepthZeroOrNil, setValueOneDepthZero |
| Methods inherited from class org.jruby.runtime.scope.OneVarDynamicScope |
|---|
getValueZeroDepthZeroOrNil, setValueZeroDepthZero |
| Methods inherited from class org.jruby.runtime.scope.NoVarsDynamicScope |
|---|
getValueThreeDepthZeroOrNil, setValueThreeDepthZero |
| Methods inherited from class org.jruby.runtime.DynamicScope |
|---|
getAllNamesInScope, getEvalScope, getFlipScope, getNextCapturedScope, getNthParentScope, getStaticScope, newDummyScope, newDynamicScope, newDynamicScope, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected IRubyObject variableValueTwo
| Constructor Detail |
|---|
public ThreeVarDynamicScope(StaticScope staticScope,
DynamicScope parent)
public ThreeVarDynamicScope(StaticScope staticScope)
| Method Detail |
|---|
public void growIfNeeded()
growIfNeeded in class TwoVarDynamicScopepublic DynamicScope cloneScope()
cloneScope in class TwoVarDynamicScopepublic IRubyObject[] getValues()
getValues in class TwoVarDynamicScope
public IRubyObject getValue(int offset,
int depth)
getValue in class TwoVarDynamicScopeoffset - zero-indexed value that represents where variable livesdepth - how many captured scopes down this variable should be set
public IRubyObject getValueOrNil(int offset,
int depth,
IRubyObject nil)
getValueOrNil in class OneVarDynamicScope
public IRubyObject getValueDepthZeroOrNil(int offset,
IRubyObject nil)
DynamicScope
getValueDepthZeroOrNil in class TwoVarDynamicScopepublic IRubyObject getValueTwoDepthZeroOrNil(IRubyObject nil)
DynamicScope
getValueTwoDepthZeroOrNil in class NoVarsDynamicScope
public IRubyObject setValue(int offset,
IRubyObject value,
int depth)
setValue in class TwoVarDynamicScopeoffset - zero-indexed value that represents where variable livesvalue - to setdepth - how many captured scopes down this variable should be set
public IRubyObject setValueDepthZero(IRubyObject value,
int offset)
DynamicScope
setValueDepthZero in class TwoVarDynamicScopevalue - to setoffset - zero-indexed value that represents where variable livespublic IRubyObject setValueTwoDepthZero(IRubyObject value)
DynamicScope
setValueTwoDepthZero in class NoVarsDynamicScope
public void setArgValues(IRubyObject[] values,
int size)
setArgValues in class TwoVarDynamicScopevalues - up to size specified to be mapped as ordinary parm valuessize - is the number of values to assign as ordinary parm valuespublic IRubyObject[] getArgValues()
DynamicScope
getArgValues in class TwoVarDynamicScope
public java.lang.String toString(java.lang.StringBuffer buf,
java.lang.String indent)
toString in class TwoVarDynamicScope
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||