public class ScriptWrapperCombiner extends java.lang.Object implements ScriptWrapper<java.lang.Object>, DebuggingWrapper<java.lang.Object>
MODE_BLOCKING, MODE_NON_BLOCKING, OPTIM_LEVEL_DEFAULT, OPTIM_LEVEL_MAX, OPTIM_LEVEL_MIN
Constructor and Description |
---|
ScriptWrapperCombiner() |
Modifier and Type | Method and Description |
---|---|
void |
__step__(java.lang.Object... args)
Fired when entering a step.
|
void |
addExceptionListener(ScriptExceptionListener listener)
Add a listener which will be fired for script exceptions.
|
void |
addImports(java.lang.Class<?>... imports)
Do nothing.
|
void |
addImports(java.util.Set<java.lang.String> imports)
Do nothing.
|
void |
addImports(java.lang.String... imports)
Do nothing.
|
boolean |
addScriptWrapper(ScriptWrapper<?> wrapper)
Add a script wrapper to the list of scripts to use.
|
void |
clearImports()
Do nothing.
|
int |
countImportLines()
Return the number of import lines.
|
void |
err(java.lang.String message,
char errorType,
java.lang.Throwable e)
Log an error.
|
ScriptWrapper<?> |
findAndInstallScript(java.io.File file)
Create the script, using the current context ClassLoader.
|
ScriptWrapper<?> |
findAndInstallScript(java.io.File file,
java.lang.ClassLoader loader)
Create the script.
|
ScriptWrapper<?> |
findAndInstallScript(ScriptSource source,
java.lang.ClassLoader loader)
Create the script.
|
ScriptWrapper<?> |
findAndInstallScript(java.lang.String content,
java.lang.ClassLoader loader)
Create the script.
|
ScriptWrapper<?> |
findAndInstallScript(java.net.URL url)
Create the script, using the current context ClassLoader.
|
java.lang.ClassLoader |
getClassLoader()
Return the ClassLoader.
|
java.util.List<ScriptExceptionListener> |
getExceptionListeners()
Return the listeners which will be fired for script exceptions.
|
short |
getExecutionMode()
Return the execution mode.
|
java.lang.String |
getFilename()
Return the script filename.
|
java.lang.String |
getMIME()
Return the script MIME.
|
int |
getOffset()
Return the script offset after the import lines.
|
java.lang.Object |
getRawScript()
Return the script.
|
java.lang.String |
getScriptClassName()
Return the class name of the script.
|
java.lang.String |
getScriptContent()
Return the script text content.
|
ScriptContext |
getScriptContext()
Return the script context.
|
ScriptException |
getScriptException(java.lang.Throwable th)
Create a Script exception from a Throwable.
|
java.lang.String |
getScriptExtension()
Return the script file extension.
|
java.lang.Class |
getScriptInterface()
Return the class of the script interface.
|
ScriptProxy |
getScriptProxy(java.lang.Object script)
Return the script proxy.
|
ScriptWrapper<?> |
getScriptWrapper()
Return the currently used script wrapper.
|
java.util.List<AbstractScriptWrapper<?>> |
getScriptWrappers()
Return the list of script wrappers to use.
|
ScriptSource |
getSource()
Return the script source.
|
boolean |
hasScriptHelper()
Return true if there is a script helper.
|
java.lang.Object |
installScript(java.io.File file)
Create the script, using the current context ClassLoader.
|
java.lang.Object |
installScript(java.io.File file,
java.lang.ClassLoader loader)
Create the script.
|
java.lang.Object |
installScript(ScriptSource source,
java.lang.ClassLoader loader)
Create the script.
|
java.lang.Object |
installScript(java.net.URL url)
Create the script, using the current context ClassLoader.
|
java.lang.Object |
installScript(java.net.URL url,
java.lang.ClassLoader loader)
Create the script.
|
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.
|
java.lang.Object |
reInstallScript()
Reinstall an already installed script.
|
boolean |
removeExceptionListener(ScriptExceptionListener listener)
Remove a previously added exception listener.
|
void |
setClassLoader(java.lang.ClassLoader loader)
Set the ClassLoader.
|
void |
setExecutionMode(short mode)
Set the execution mode.
|
void |
setScriptContext(ScriptContext context)
Set the script context.
|
void |
setScriptLogger(ScriptLogger logger)
Set the script logger.
|
void |
startMethod()
Start a script method.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDebugSession, endDebugSession, getDebugListener, getDebugSession, getParentWrapper, initializeDebugSession, isDebugSupported, setDebugListener
addAdditionalHelper, clearAdditionalHelpers, err, getAdditionalHelpers, getLineNumber, getLineNumber, getOptimizationLevel, getScript, getScriptProxy, getScriptProxyHandler, hasAdditionalHelpers, hasSingletonMethod, installScript, installScript, installScript, isLibAvailable, isLibAvailable, isLoggingExceptions, isMultiImplementSupported, isSingletonMethodEnabled, logExceptions, resetWrapperState, setOptimizationLevel
cacheInvocableMethods, getInvocableMethods, getInvocableMethodsByNames, hasInvocableMethod, invokeMethod, invokeMethod, isAutoCachingInvocableMethods, isInvocableByName, isInvocableMethodsEnabled, setAutoCacheInvocableMethods
public java.lang.String getMIME()
getMIME
in interface ScriptWrapper<java.lang.Object>
public boolean addScriptWrapper(ScriptWrapper<?> wrapper)
AbstractScriptWrapper
wrapper
- the script wrapperpublic java.util.List<AbstractScriptWrapper<?>> getScriptWrappers()
public ScriptWrapper<?> getScriptWrapper()
public void setExecutionMode(short mode)
setExecutionMode
in interface ScriptWrapper<java.lang.Object>
mode
- the execution modepublic short getExecutionMode()
getExecutionMode
in interface ScriptWrapper<java.lang.Object>
public ScriptWrapper<?> findAndInstallScript(java.net.URL url)
url
- the script URLpublic ScriptWrapper<?> findAndInstallScript(java.io.File file)
file
- the script filepublic ScriptWrapper<?> findAndInstallScript(java.io.File file, java.lang.ClassLoader loader)
file
- the script fileloader
- the ClassLoaderpublic ScriptWrapper<?> findAndInstallScript(java.lang.String content, java.lang.ClassLoader loader)
content
- the script contentloader
- the ClassLoaderpublic ScriptWrapper<?> findAndInstallScript(ScriptSource source, java.lang.ClassLoader loader)
source
- the script sourceloader
- the ClassLoaderpublic java.lang.Object installScript(java.net.URL url)
installScript
in interface ScriptWrapper<java.lang.Object>
url
- the script URLpublic java.lang.Object installScript(java.io.File file)
installScript
in interface ScriptWrapper<java.lang.Object>
file
- the script filepublic java.lang.Object installScript(java.net.URL url, java.lang.ClassLoader loader)
installScript
in interface ScriptWrapper<java.lang.Object>
url
- the script URLloader
- the ClassLoaderpublic java.lang.Object installScript(java.io.File file, java.lang.ClassLoader loader)
installScript
in interface ScriptWrapper<java.lang.Object>
file
- the script fileloader
- the ClassLoaderpublic java.lang.Object installScript(ScriptSource source, java.lang.ClassLoader loader)
installScript
in interface ScriptWrapper<java.lang.Object>
source
- the script sourceloader
- the ClassLoaderpublic void setClassLoader(java.lang.ClassLoader loader)
setClassLoader
in interface ScriptWrapper<java.lang.Object>
loader
- the ClassLoaderpublic java.lang.ClassLoader getClassLoader()
getClassLoader
in interface ScriptWrapper<java.lang.Object>
public void addExceptionListener(ScriptExceptionListener listener)
addExceptionListener
in interface ScriptWrapper<java.lang.Object>
listener
- the listenerpublic java.util.List<ScriptExceptionListener> getExceptionListeners()
getExceptionListeners
in interface ScriptWrapper<java.lang.Object>
public boolean removeExceptionListener(ScriptExceptionListener listener)
removeExceptionListener
in interface ScriptWrapper<java.lang.Object>
listener
- the listenerpublic void setScriptContext(ScriptContext context)
setScriptContext
in interface ScriptWrapper<java.lang.Object>
context
- the script contextpublic java.lang.String getScriptContent()
getScriptContent
in interface ScriptWrapper<java.lang.Object>
public ScriptContext getScriptContext()
getScriptContext
in interface ScriptWrapper<java.lang.Object>
public boolean hasScriptHelper()
hasScriptHelper
in interface ScriptWrapper<java.lang.Object>
public java.lang.Object getRawScript()
getRawScript
in interface ScriptWrapper<java.lang.Object>
public ScriptProxy getScriptProxy(java.lang.Object script)
getScriptProxy
in interface ScriptWrapper<java.lang.Object>
script
- the scriptpublic java.lang.Class getScriptInterface()
getScriptInterface
in interface ScriptWrapper<java.lang.Object>
public java.lang.String getScriptClassName()
getScriptClassName
in interface ScriptWrapper<java.lang.Object>
public ScriptSource getSource()
getSource
in interface ScriptWrapper<java.lang.Object>
public java.lang.String getFilename()
getFilename
in interface ScriptWrapper<java.lang.Object>
public void addImports(java.util.Set<java.lang.String> imports)
addImports
in interface ScriptWrapper<java.lang.Object>
imports
- the additional custom import declarationspublic void addImports(java.lang.String... imports)
addImports
in interface ScriptWrapper<java.lang.Object>
imports
- the additional custom import declarationspublic void addImports(java.lang.Class<?>... imports)
addImports
in interface ScriptWrapper<java.lang.Object>
imports
- the additional custom import declarationspublic void clearImports()
clearImports
in interface ScriptWrapper<java.lang.Object>
public int getOffset()
getOffset
in interface ScriptWrapper<java.lang.Object>
public int countImportLines()
countImportLines
in interface ScriptWrapper<java.lang.Object>
public java.lang.String getScriptExtension()
getScriptExtension
in interface ScriptWrapper<java.lang.Object>
public ScriptException getScriptException(java.lang.Throwable th)
getScriptException
in interface ScriptWrapper<java.lang.Object>
th
- the Throwablepublic void setScriptLogger(ScriptLogger logger)
setScriptLogger
in interface ScriptWrapper<java.lang.Object>
logger
- the script loggerpublic java.lang.Object reInstallScript()
reInstallScript
in interface ScriptWrapper<java.lang.Object>
public void startMethod()
startMethod
in interface ScriptWrapper<java.lang.Object>
public void err(java.lang.String message, char errorType, java.lang.Throwable e)
err
in interface ScriptWrapper<java.lang.Object>
message
- the error messageerrorType
- the error typee
- the ThrowableErrorType
public boolean isDebugging()
isDebugging
in interface ScriptWrapper<java.lang.Object>
public boolean isInDebugSession()
isInDebugSession
in interface ScriptWrapper<java.lang.Object>
public void __step__(java.lang.Object... args)
__step__
in interface ScriptWrapper<java.lang.Object>
args
- the argumentsCopyright © 2019-2024 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence