public final class Frame extends Object
ThreadContext
Constructor and Description |
---|
Frame()
Empty constructor, since Frame objects are pre-allocated and updated
when needed.
|
Modifier and Type | Method and Description |
---|---|
Frame |
capture() |
Frame |
clear()
Clear the frame, as when the call completes.
|
Frame |
duplicate()
Clone this frame.
|
Frame |
duplicateForBacktrace()
Clone this frame for use in backtraces only (avoiding long-lived
references to other elements.
|
IRubyObject |
getBackRef(IRubyObject nil) |
Block |
getBlock()
Retrieve the block associated with this frame.
|
int |
getJumpTarget()
Get the jump target for non-local returns in this frame.
|
RubyModule |
getKlazz()
Return class that we are calling against
|
IRubyObject |
getLastLine(IRubyObject nil) |
String |
getName()
Get the method name associated with this frame
|
IRubyObject |
getSelf()
Get the self associated with this frame
|
Visibility |
getVisibility()
Get the visibility at the time of this frame
|
boolean |
isCaptured() |
IRubyObject |
setBackRef(IRubyObject backRef) |
void |
setCaptured(boolean captured) |
void |
setKlazz(RubyModule klazz)
Set the class we are calling against.
|
IRubyObject |
setLastLine(IRubyObject lastLine) |
void |
setName(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
|
String |
toString() |
void |
updateFrame()
Update the frame with just filename and line, used for top-level frames
and method.
|
void |
updateFrame(Frame frame)
Update the frame based on information from another frame.
|
void |
updateFrame(RubyModule klazz,
IRubyObject self,
String name,
Block block,
int jumpTarget)
Update the frame based on the given values.
|
void |
updateFrame(String name)
Update the frame with caller information and method name, so it will
show up correctly in call stacks.
|
void |
updateFrameForEval(IRubyObject self,
int jumpTarget)
Update the frame based on the given values.
|
public Frame()
public void updateFrame()
fileName
- The file where the calling method is locatedline
- The line number in the calling method where the call is madepublic void updateFrame(String name)
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, String name, Block block, int jumpTarget)
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, int jumpTarget)
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 Frame clear()
public Frame duplicate()
public Frame duplicateForBacktrace()
public int getJumpTarget()
public RubyModule getKlazz()
public void setKlazz(RubyModule klazz)
klazz
- the new classpublic void setName(String name)
name
- the new namepublic String getName()
public IRubyObject getSelf()
public void setSelf(IRubyObject self)
self
- The new value of selfpublic Visibility getVisibility()
public void setVisibility(Visibility visibility)
visibility
- The new visibilitypublic Block getBlock()
public IRubyObject getBackRef(IRubyObject nil)
public IRubyObject setBackRef(IRubyObject backRef)
public IRubyObject getLastLine(IRubyObject nil)
public IRubyObject setLastLine(IRubyObject lastLine)
public void setCaptured(boolean captured)
public Frame capture()
public boolean isCaptured()
Copyright © 2001-2015 JRuby. All Rights Reserved.