|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.runtime.Frame
public final class Frame
A Frame holds per-call information that needs to persist outside the execution of a given method. Currently a frame holds the following:
ThreadContext
Constructor Summary | |
---|---|
Frame()
Empty constructor, since Frame objects are pre-allocated and updated when needed. |
Method Summary | |
---|---|
void |
clear()
Clear the frame, as when the call completes. |
Frame |
duplicate()
Clone this frame. |
Block |
getBlock()
Retrieve the block associated with this frame. |
java.lang.String |
getFile()
Get the filename of the caller. |
JumpTarget |
getJumpTarget()
Get the jump target for non-local returns in this frame. |
RubyModule |
getKlazz()
Return class that we are calling against |
int |
getLine()
Get the line number where this call is being made. |
java.lang.String |
getName()
Get the method name associated with this frame |
Visibility |
getVisibility()
Get the visibility at the time of this frame |
boolean |
isBindingFrame()
Is this frame the frame which started a binding eval? |
void |
setFile(java.lang.String fileName)
Set the filename of the caller. |
void |
setFileAndLine(java.lang.String file,
int line)
Set both the file and line |
void |
setIsBindingFrame(boolean isBindingFrame)
Set whether this is a binding frame or not |
void |
setJumpTarget(JumpTarget jumpTarget)
Deprecated. |
void |
setKlazz(RubyModule klazz)
Set the class we are calling against. |
void |
setLine(int line)
Set the line number where this call is being made |
void |
setName(java.lang.String name)
Set the method name associated with this frame |
void |
setSelf(IRubyObject self)
Set the self associated with this frame |
void |
setVisibility(Visibility visibility)
Change the visibility associated with this frame |
java.lang.String |
toString()
|
void |
updateFrame(Frame frame)
Update the frame based on information from another frame. |
void |
updateFrame(RubyModule klazz,
IRubyObject self,
java.lang.String name,
Block block,
java.lang.String fileName,
int line)
Update the frame based on the given values. |
void |
updateFrame(java.lang.String fileName,
int line)
Update the frame with just filename and line, used for top-level frames and method. |
void |
updateFrame(java.lang.String name,
java.lang.String fileName,
int line)
Update the frame with caller information and method name, so it will show up correctly in call stacks. |
void |
updateFrameForEval(IRubyObject self,
java.lang.String fileName,
int line)
Update the frame based on the given values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Frame()
Method Detail |
---|
public void updateFrame(java.lang.String fileName, int line)
fileName
- The file where the calling method is locatedline
- The line number in the calling method where the call is madepublic void updateFrame(java.lang.String name, java.lang.String fileName, int line)
name
- The name of the method being calledfileName
- The file of the calling methodline
- The line number of the call to this methodpublic void updateFrame(Frame frame)
frame
- The frame whose data to duplicate in this framepublic void updateFrame(RubyModule klazz, IRubyObject self, java.lang.String name, Block block, java.lang.String fileName, int line)
klazz
- The class against which the method is being calledself
- The 'self' for the methodname
- The name under which the method is being invokedblock
- The block passed to the methodfileName
- The filename of the calling methodline
- The line number where the call is being madejumpTarget
- The target for non-local jumps (return in block)public void updateFrameForEval(IRubyObject self, java.lang.String fileName, int line)
klazz
- The class against which the method is being calledself
- The 'self' for the methodname
- The name under which the method is being invokedblock
- The block passed to the methodfileName
- The filename of the calling methodline
- The line number where the call is being madejumpTarget
- The target for non-local jumps (return in block)public void clear()
public Frame duplicate()
public JumpTarget getJumpTarget()
@Deprecated public void setJumpTarget(JumpTarget jumpTarget)
jumpTarget
- The new jump target for non-local returnspublic java.lang.String getFile()
public void setFile(java.lang.String fileName)
fileName
- public int getLine()
public void setLine(int line)
line
- The new line number where this call is being madepublic void setFileAndLine(java.lang.String file, int line)
public RubyModule getKlazz()
public void setKlazz(RubyModule klazz)
klazz
- the new classpublic void setName(java.lang.String name)
name
- the new namepublic java.lang.String getName()
public void setSelf(IRubyObject self)
self
- The new value of selfpublic Visibility getVisibility()
public void setVisibility(Visibility visibility)
visibility
- The new visibilitypublic boolean isBindingFrame()
public void setIsBindingFrame(boolean isBindingFrame)
isBindingFrame
- Whether this is a binding framepublic Block getBlock()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |