|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.runtime.ThreadContext
public final class ThreadContext
Method Summary | |
---|---|
void |
callThreadPoll()
|
Frame[] |
createBacktrace(int level,
boolean nativeException)
Create an Array with backtrace information. |
static IRubyObject |
createBacktraceFromFrames(Ruby runtime,
Frame[] backtraceFrames)
Create an Array with backtrace information. |
static IRubyObject |
createBacktraceFromFrames(Ruby runtime,
Frame[] backtraceFrames,
boolean cropAtEval)
Create an Array with backtrace information. |
protected void |
finalize()
|
RubyKernel.CatchTarget[] |
getActiveCatches()
|
RubyModule |
getBindingRubyClass()
|
IRubyObject |
getConstant(java.lang.String internedName)
Used by the evaluator and the compiler to look up a constant by name |
boolean |
getConstantDefined(java.lang.String internedName)
|
Frame |
getCurrentFrame()
|
Frame |
getCurrentRubyFrame()
|
DynamicScope |
getCurrentScope()
|
Visibility |
getCurrentVisibility()
|
IRubyObject |
getErrorInfo()
|
FiberLibrary.Fiber |
getFiber()
|
java.lang.String |
getFile()
|
Block |
getFrameBlock()
|
int |
getFrameCount()
|
JumpTarget |
getFrameJumpTarget()
|
RubyModule |
getFrameKlazz()
|
java.lang.String |
getFrameName()
|
IRubyObject |
getFrameSelf()
|
CallType |
getLastCallType()
|
IRubyObject |
getLastExitStatus()
|
Visibility |
getLastVisibility()
|
int |
getLine()
|
Frame |
getNextFrame()
|
Frame |
getPreviousFrame()
|
DynamicScope |
getPreviousScope()
|
Visibility |
getPreviousVisibility()
|
RubyModule |
getRubyClass()
|
int |
getRubyFrameDelta()
|
Ruby |
getRuntime()
|
RubyThread |
getThread()
|
boolean |
isWithinDefined()
Is this thread actively in defined? at the moment. |
boolean |
isWithinTrace()
Is this thread actively tracing at this moment. |
static ThreadContext |
newContext(Ruby runtime)
|
void |
pollThreadEvents()
|
void |
popCatch()
|
RubyModule |
popRubyClass()
|
void |
popScope()
|
void |
postBsfApply()
|
void |
postClassEval()
|
void |
postCompiledClass()
|
void |
postEvalWithBinding(Binding binding,
Frame lastFrame)
|
void |
postExecuteUnder()
|
void |
postMethodBacktraceAndScope()
|
void |
postMethodBacktraceOnly()
|
void |
postMethodFrameAndScope()
|
void |
postMethodFrameOnly()
|
void |
postMethodScopeOnly()
|
void |
postMproc()
|
void |
postNodeEval()
|
void |
postScopedBody()
|
void |
postScopeNode()
|
void |
postTrace()
|
void |
postYield(Binding binding,
Frame lastFrame)
|
void |
postYieldLight(Binding binding,
Frame lastFrame)
|
void |
postYieldNoScope(Frame lastFrame)
|
void |
preAdoptThread()
|
void |
preBsfApply(java.lang.String[] names)
|
void |
preClassEval(StaticScope staticScope,
RubyModule type)
|
void |
preCompiledClass(RubyModule type,
java.lang.String[] scopeNames)
|
Frame |
preEvalWithBinding(Binding binding)
|
void |
preExecuteUnder(RubyModule executeUnderClass,
Block block)
|
Frame |
preForBlock(Binding binding,
RubyModule klass)
|
void |
preMethodBacktraceAndScope(java.lang.String name,
RubyModule clazz,
StaticScope staticScope)
|
void |
preMethodBacktraceOnly(java.lang.String name)
|
void |
preMethodFrameAndScope(RubyModule clazz,
java.lang.String name,
IRubyObject self,
Block block,
StaticScope staticScope,
JumpTarget jumpTarget)
|
void |
preMethodFrameOnly(RubyModule clazz,
java.lang.String name,
IRubyObject self,
Block block,
JumpTarget jumpTarget)
|
void |
preMethodScopeOnly(RubyModule clazz,
StaticScope staticScope)
|
void |
preMproc()
|
void |
preNodeEval(RubyModule rubyClass,
IRubyObject self)
|
void |
preNodeEval(RubyModule rubyClass,
IRubyObject self,
java.lang.String name)
|
void |
prepareTopLevel(RubyClass objectClass,
IRubyObject topSelf)
|
void |
preRunThread(Frame currentFrame)
|
void |
preScopedBody(DynamicScope scope)
|
void |
preScopeNode(StaticScope staticScope)
|
void |
preTrace()
|
Frame |
preYieldLightBlock(Binding binding,
DynamicScope emptyScope,
RubyModule klass)
|
Frame |
preYieldNoScope(Binding binding,
RubyModule klass)
|
Frame |
preYieldSpecificBlock(Binding binding,
StaticScope scope,
RubyModule klass)
|
void |
printScope()
|
void |
pushCatch(RubyKernel.CatchTarget catchTarget)
|
void |
pushRubyClass(RubyModule currentModule)
|
void |
pushScope(DynamicScope scope)
|
JumpException.ReturnJump |
returnJump(IRubyObject value)
|
IRubyObject |
setConstantInCurrent(java.lang.String internedName,
IRubyObject result)
Used by the evaluator and the compiler to set a constant by name This is for a null const decl |
IRubyObject |
setConstantInModule(java.lang.String internedName,
IRubyObject target,
IRubyObject result)
Used by the evaluator and the compiler to set a constant by name. |
IRubyObject |
setConstantInObject(java.lang.String internedName,
IRubyObject result)
Used by the evaluator and the compiler to set a constant by name This is for a Colon2 const decl |
void |
setCurrentVisibility(Visibility visibility)
|
IRubyObject |
setErrorInfo(IRubyObject errorInfo)
|
void |
setFiber(FiberLibrary.Fiber fiber)
|
void |
setFile(java.lang.String file)
|
void |
setFileAndLine(java.lang.String file,
int line)
|
void |
setFrameJumpTarget(JumpTarget target)
Deprecated. |
void |
setLastCallStatus(CallType callType)
Returns the lastCallStatus. |
void |
setLastExitStatus(IRubyObject lastExitStatus)
|
void |
setLastVisibility(Visibility visibility)
|
void |
setLine(int line)
|
void |
setRubyFrameDelta(int newDelta)
|
void |
setThread(RubyThread thread)
|
void |
setWithinDefined(boolean isWithinDefined)
Set whether we are actively within defined? or not. |
void |
setWithinTrace(boolean isWithinTrace)
Set whether we are actively tracing or not on this thread. |
void |
trace(int event,
java.lang.String name,
RubyModule implClass)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ThreadContext newContext(Ruby runtime)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public final Ruby getRuntime()
public IRubyObject getErrorInfo()
public IRubyObject setErrorInfo(IRubyObject errorInfo)
public JumpException.ReturnJump returnJump(IRubyObject value)
public void setLastCallStatus(CallType callType)
public CallType getLastCallType()
public void setLastVisibility(Visibility visibility)
public Visibility getLastVisibility()
public IRubyObject getLastExitStatus()
public void setLastExitStatus(IRubyObject lastExitStatus)
public void printScope()
public DynamicScope getCurrentScope()
public DynamicScope getPreviousScope()
public void pushScope(DynamicScope scope)
public void popScope()
public RubyThread getThread()
public void setThread(RubyThread thread)
public FiberLibrary.Fiber getFiber()
public void setFiber(FiberLibrary.Fiber fiber)
public void pushCatch(RubyKernel.CatchTarget catchTarget)
public void popCatch()
public RubyKernel.CatchTarget[] getActiveCatches()
public Frame getCurrentFrame()
public int getRubyFrameDelta()
public void setRubyFrameDelta(int newDelta)
public Frame getCurrentRubyFrame()
public Frame getNextFrame()
public Frame getPreviousFrame()
public int getFrameCount()
public java.lang.String getFrameName()
public IRubyObject getFrameSelf()
public JumpTarget getFrameJumpTarget()
@Deprecated public void setFrameJumpTarget(JumpTarget target)
public RubyModule getFrameKlazz()
public Block getFrameBlock()
public java.lang.String getFile()
public int getLine()
public void setFile(java.lang.String file)
public void setLine(int line)
public void setFileAndLine(java.lang.String file, int line)
public Visibility getCurrentVisibility()
public Visibility getPreviousVisibility()
public void setCurrentVisibility(Visibility visibility)
public void pollThreadEvents()
public void callThreadPoll()
public void trace(int event, java.lang.String name, RubyModule implClass)
public void pushRubyClass(RubyModule currentModule)
public RubyModule popRubyClass()
public RubyModule getRubyClass()
public RubyModule getBindingRubyClass()
public boolean getConstantDefined(java.lang.String internedName)
public IRubyObject getConstant(java.lang.String internedName)
public IRubyObject setConstantInCurrent(java.lang.String internedName, IRubyObject result)
public IRubyObject setConstantInModule(java.lang.String internedName, IRubyObject target, IRubyObject result)
public IRubyObject setConstantInObject(java.lang.String internedName, IRubyObject result)
public static IRubyObject createBacktraceFromFrames(Ruby runtime, Frame[] backtraceFrames)
runtime
- level
- nativeException
-
public static IRubyObject createBacktraceFromFrames(Ruby runtime, Frame[] backtraceFrames, boolean cropAtEval)
runtime
- level
- nativeException
-
public Frame[] createBacktrace(int level, boolean nativeException)
runtime
- level
- nativeException
-
public void preAdoptThread()
public void preCompiledClass(RubyModule type, java.lang.String[] scopeNames)
public void postCompiledClass()
public void preScopeNode(StaticScope staticScope)
public void postScopeNode()
public void preClassEval(StaticScope staticScope, RubyModule type)
public void postClassEval()
public void preBsfApply(java.lang.String[] names)
public void postBsfApply()
public void preMethodFrameAndScope(RubyModule clazz, java.lang.String name, IRubyObject self, Block block, StaticScope staticScope, JumpTarget jumpTarget)
public void postMethodFrameAndScope()
public void preMethodFrameOnly(RubyModule clazz, java.lang.String name, IRubyObject self, Block block, JumpTarget jumpTarget)
public void postMethodFrameOnly()
public void preMethodScopeOnly(RubyModule clazz, StaticScope staticScope)
public void postMethodScopeOnly()
public void preMethodBacktraceAndScope(java.lang.String name, RubyModule clazz, StaticScope staticScope)
public void postMethodBacktraceAndScope()
public void preMethodBacktraceOnly(java.lang.String name)
public void postMethodBacktraceOnly()
public void prepareTopLevel(RubyClass objectClass, IRubyObject topSelf)
public void preNodeEval(RubyModule rubyClass, IRubyObject self, java.lang.String name)
public void preNodeEval(RubyModule rubyClass, IRubyObject self)
public void postNodeEval()
public void preExecuteUnder(RubyModule executeUnderClass, Block block)
public void postExecuteUnder()
public void preMproc()
public void postMproc()
public void preRunThread(Frame currentFrame)
public void preTrace()
public void postTrace()
public Frame preForBlock(Binding binding, RubyModule klass)
public Frame preYieldSpecificBlock(Binding binding, StaticScope scope, RubyModule klass)
public Frame preYieldLightBlock(Binding binding, DynamicScope emptyScope, RubyModule klass)
public Frame preYieldNoScope(Binding binding, RubyModule klass)
public Frame preEvalWithBinding(Binding binding)
public void postEvalWithBinding(Binding binding, Frame lastFrame)
public void postYield(Binding binding, Frame lastFrame)
public void postYieldLight(Binding binding, Frame lastFrame)
public void postYieldNoScope(Frame lastFrame)
public void preScopedBody(DynamicScope scope)
public void postScopedBody()
public boolean isWithinTrace()
org.jruby.Ruby#callTraceFunction(String, ISourcePosition, IRubyObject, String, IRubyObject)
public void setWithinTrace(boolean isWithinTrace)
isWithinTrace
- true is soorg.jruby.Ruby#callTraceFunction(String, ISourcePosition, IRubyObject, String, IRubyObject)
public boolean isWithinDefined()
public void setWithinDefined(boolean isWithinDefined)
isWithinDefined
- true if so
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |