|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsleep.engine.CallRequest
public abstract class CallRequest
this class encapsulates a function call request. sleep has so many reasons, places, and ways to call functions. this class helps to avoid duplicate code and manage the complexity of Sleep's myriad of profiling, tracing, and error reporting options.
Nested Class Summary | |
---|---|
static class |
CallRequest.ClosureCallRequest
execute a closure with all of the trimmings. |
static class |
CallRequest.FunctionCallRequest
execute a function with all of the debug, trace, etc.. |
static class |
CallRequest.InlineCallRequest
execute a block of code inline with all the profiling, tracing, and other support |
Field Summary | |
---|---|
protected ScriptEnvironment |
environment
|
protected int |
lineNumber
|
Constructor Summary | |
---|---|
CallRequest(ScriptEnvironment e,
int lineNo)
initialize a new call request |
Method Summary | |
---|---|
void |
CallFunction()
actually execute the function call |
protected abstract Scalar |
execute()
execute the function call contained here |
protected abstract java.lang.String |
formatCall(java.lang.String args)
return a string view of this function call for trace messages; arguments are captured as comma separated descriptions of all args |
abstract java.lang.String |
getFrameDescription()
return the description of this current stack frame in the event of an exception |
abstract java.lang.String |
getFunctionName()
return the name of the function (for use in profiler statistics) |
int |
getLineNumber()
returns the line number this function call is occuring from |
protected ScriptEnvironment |
getScriptEnvironment()
returns the script environment... |
boolean |
isDebug()
return true if debug trace is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ScriptEnvironment environment
protected int lineNumber
Constructor Detail |
---|
public CallRequest(ScriptEnvironment e, int lineNo)
Method Detail |
---|
protected ScriptEnvironment getScriptEnvironment()
public int getLineNumber()
public abstract java.lang.String getFunctionName()
public abstract java.lang.String getFrameDescription()
protected abstract Scalar execute()
protected abstract java.lang.String formatCall(java.lang.String args)
public boolean isDebug()
public void CallFunction()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |