S
- the script interfacepublic abstract class AbstractDebuggingScriptWrapper<S> extends AbstractScriptWrapper<S> implements DebuggingWrapper<S>
Modifier and Type | Field and Description |
---|---|
protected DebugListener |
debugListener
The debug listener.
|
protected DebuggingWrapper<?> |
parentWrapper
The parent wrapper.
|
protected DebugSession<S> |
session
The debug session.
|
additionalHelpers, context, exListeners, firstException, hasCustomHelper, helper, importLines, logger, offset, optimLevel, scriptContent, source, VARIABLES_DECL_AFTER_CLASS_DECL, VARIABLES_DECL_BEFORE_CLASS_DECL
MODE_BLOCKING, MODE_NON_BLOCKING, OPTIM_LEVEL_DEFAULT, OPTIM_LEVEL_MAX, OPTIM_LEVEL_MIN
Constructor and Description |
---|
AbstractDebuggingScriptWrapper() |
AbstractDebuggingScriptWrapper(DebuggingWrapper<?> parentWrapper) |
Modifier and Type | Method and Description |
---|---|
void |
__step__(java.lang.Object... args)
Fired when entering a debug step.
|
DebugSession<S> |
createDebugSession()
Create a debug session.
|
void |
endDebugSession()
End a debug session.
|
void |
err(java.lang.String message,
char errorType,
java.lang.Throwable e)
Log an error.
|
DebugListener |
getDebugListener()
Return the debug listener.
|
DebugSession<S> |
getDebugSession()
Return the current Debug session.
|
int |
getLineNumber(int lineNumber)
Return the effective line number of a line detected in the script runtime.
|
int |
getLineNumber(int lineNumber,
boolean isException)
Return the effective line number of a line detected in the script runtime.
|
DebuggingWrapper<?> |
getParentWrapper()
Return the parent Script wrapper.
|
protected ScriptLogger |
getPreferredLogger()
Return the preferred logger.
|
void |
initializeDebugSession()
Initialize a debug session.
|
boolean |
isDebugging()
Return true if the wrapper is in a debug session and debugging.
|
boolean |
isInDebugSession()
Return true if the wrapper is in a debug session.
|
void |
setDebugListener(DebugListener debugListener)
Set the debug listener.
|
addAdditionalHelper, addExceptionListener, addImports, addImports, addImports, clearAdditionalHelpers, clearImports, convertPrimitiveArgument, countImportLines, createScriptContext, createScriptObject, createScriptObject, getAdditionalHelpers, getClassLoader, getCompileException, getContextClassPath, getCustomImports, getDefaultContent, getDefaultDeclaration, getDefaultImports, getEnd, getExceptionListeners, getExecutionMode, getFilename, getHelperClassPath, getInvocableMethodKey, getLoggerClassPath, getOffset, getOptimizationLevel, getRawScript, getScriptClassName, getScriptContent, getScriptContext, getScriptInterface, getScriptProxy, getSingletonMethod, getSource, getVariablesDeclarationsPosition, hasAdditionalHelpers, hasScriptHelper, hasSingletonMethod, installScript, installScript, installScript, installScript, isLoggingExceptions, logExceptions, parseScript, reInstallScript, reInstallScript, reInstallScript, removeExceptionListener, removeTabulations, setClassLoader, setExecutionMode, setOptimizationLevel, setScriptContext, setScriptLogger, startMethod
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isDebugSupported
addAdditionalHelper, addExceptionListener, addImports, addImports, addImports, clearAdditionalHelpers, clearImports, countImportLines, err, getAdditionalHelpers, getClassLoader, getExceptionListeners, getExecutionMode, getFilename, getMIME, getOffset, getOptimizationLevel, getRawScript, getScript, getScriptClassName, getScriptContent, getScriptContext, getScriptException, getScriptExtension, getScriptInterface, getScriptProxy, getScriptProxy, getScriptProxyHandler, getSource, hasAdditionalHelpers, hasScriptHelper, hasSingletonMethod, installScript, installScript, installScript, installScript, installScript, installScript, installScript, installScript, isLibAvailable, isLibAvailable, isLoggingExceptions, isMultiImplementSupported, isSingletonMethodEnabled, logExceptions, reInstallScript, removeExceptionListener, resetWrapperState, setClassLoader, setExecutionMode, setOptimizationLevel, setScriptContext, setScriptLogger, startMethod
cacheInvocableMethods, getInvocableMethods, getInvocableMethodsByNames, hasInvocableMethod, invokeMethod, invokeMethod, isAutoCachingInvocableMethods, isInvocableByName, isInvocableMethodsEnabled, setAutoCacheInvocableMethods
protected DebugListener debugListener
protected DebugSession<S> session
protected DebuggingWrapper<?> parentWrapper
public AbstractDebuggingScriptWrapper()
public AbstractDebuggingScriptWrapper(DebuggingWrapper<?> parentWrapper)
public DebuggingWrapper<?> getParentWrapper()
getParentWrapper
in interface DebuggingWrapper<S>
public void initializeDebugSession()
initializeDebugSession
in interface DebuggingWrapper<S>
public void endDebugSession()
endDebugSession
in interface DebuggingWrapper<S>
public DebugSession<S> createDebugSession() throws java.lang.Exception
initializeDebugSession()
.createDebugSession
in interface DebuggingWrapper<S>
java.lang.Exception
public DebugSession<S> getDebugSession()
getDebugSession
in interface DebuggingWrapper<S>
public void setDebugListener(DebugListener debugListener)
setDebugListener
in interface DebuggingWrapper<S>
debugListener
- the debug listenerpublic DebugListener getDebugListener()
getDebugListener
in interface DebuggingWrapper<S>
public void __step__(java.lang.Object... args)
__step__
in interface ScriptWrapper<S>
args
- the argumentspublic boolean isDebugging()
isDebugging
in interface ScriptWrapper<S>
public boolean isInDebugSession()
isInDebugSession
in interface ScriptWrapper<S>
protected ScriptLogger getPreferredLogger()
getPreferredLogger
in class AbstractScriptWrapper<S>
public void err(java.lang.String message, char errorType, java.lang.Throwable e)
err
in interface ScriptWrapper<S>
err
in class AbstractScriptWrapper<S>
message
- the error messageerrorType
- the error typee
- the ThrowableErrorType
public int getLineNumber(int lineNumber)
getLineNumber
in interface ScriptWrapper<S>
getLineNumber
in class AbstractScriptWrapper<S>
lineNumber
- the line numberpublic int getLineNumber(int lineNumber, boolean isException)
getLineNumber
in interface ScriptWrapper<S>
lineNumber
- the line numberisException
- true for getting the line number for an exceptionCopyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence