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 |
abort(java.lang.String message)
Abort the script execution.
|
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.
|
java.lang.Object |
createAdditionalScript(java.io.File file,
boolean useContext)
Create another script that can be used in the current script.
|
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.io.File |
getActiveEncodedScriptFile(java.lang.Object key)
Return the active script file for an encoded script key.
|
java.io.File |
getActiveScriptFile(java.lang.String name)
Return the active script file for an effective script name.
|
ActiveScripts |
getActiveScripts()
Return the active scripts of the currently used script wrapper.
|
ScriptSource |
getActiveScriptSource(java.lang.String name)
Return the active script source for a script name.
|
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.io.File |
getScriptFile(java.lang.String name)
Return the script file for an effective script name.
|
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 |
hasActiveScriptFile(java.lang.String name)
Return true if there is an active script file for an effective script name.
|
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, waitcreateDebugSession, endDebugSession, getDebugListener, getDebugSession, getParentWrapper, initializeDebugSession, isDebugSupported, setDebugListenerabort, addAdditionalHelper, clearAdditionalHelpers, createAdditionalScript, err, getAdditionalHelpers, getLineNumber, getLineNumber, getOptimizationLevel, getScript, getScriptProxy, getScriptProxyHandler, hasAdditionalHelpers, hasSingletonMethod, installScript, installScript, installScript, isLibAvailable, isLibAvailable, isLoggingExceptions, isMultiImplementSupported, isSingletonMethodEnabled, logExceptions, resetWrapperState, setOptimizationLevelcacheInvocableMethods, getInvocableMethods, getInvocableMethodsByNames, hasInvocableMethod, invokeMethod, invokeMethod, isAutoCachingInvocableMethods, isInvocableByName, isInvocableMethodsEnabled, setAutoCacheInvocableMethodspublic 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 ActiveScripts getActiveScripts()
getActiveScripts in interface ScriptWrapper<java.lang.Object>public java.io.File getActiveEncodedScriptFile(java.lang.Object key)
getActiveEncodedScriptFile in interface ScriptWrapper<java.lang.Object>key - the encoded script keypublic java.io.File getActiveScriptFile(java.lang.String name)
getActiveScriptFile in interface ScriptWrapper<java.lang.Object>name - the script namepublic java.io.File getScriptFile(java.lang.String name)
getScriptFile in interface ScriptWrapper<java.lang.Object>name - the script namepublic boolean hasActiveScriptFile(java.lang.String name)
hasActiveScriptFile in interface ScriptWrapper<java.lang.Object>name - the script namepublic ScriptSource getActiveScriptSource(java.lang.String name)
getActiveScriptSource in interface ScriptWrapper<java.lang.Object>name - the script namepublic 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 java.lang.Object createAdditionalScript(java.io.File file,
boolean useContext)
throws ScriptRuntimeException
createAdditionalScript in interface ScriptWrapper<java.lang.Object>file - the script fileuseContext - true if the additional script must use the contextScriptRuntimeException - if the script could not be created (the file may not exist, or the syntax is invalid)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 abort(java.lang.String message)
abort in interface ScriptWrapper<java.lang.Object>message - the abort message (can be null)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 ThrowableErrorTypepublic 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-2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence