S - the Script interfacepublic abstract class AbstractScriptFactory<S> extends java.lang.Object implements ScriptFactory
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.ClassLoader |
classLoader
The ClassLoader.
|
protected XULScriptContext |
context
The XULScriptContext.
|
protected org.scripthelper.exceptions.ScriptExceptionListener |
exceptionListener
The ScriptExceptionListener.
|
protected java.util.Map<java.lang.Class<?>,ScriptLanguageFactory<?>> |
langFactories
The ScriptLanguageFactory.
|
protected org.scripthelper.context.ScriptLogger |
scriptLogger
The ScriptLogger.
|
| Constructor and Description |
|---|
AbstractScriptFactory() |
| Modifier and Type | Method and Description |
|---|---|
ScriptHandle |
addScript(short scriptType,
XULDocument document,
org.scripthelper.model.ScriptSource source)
Add a script.
|
ScriptHandle |
addScript(XULDocument document,
org.scripthelper.model.ScriptSource source)
Add a script.
|
void |
addScriptToDocuments(ScriptHandle script)
Add a script to all XUL documents.
|
void |
addScriptToXUL(java.net.URL url,
XULDocument doc)
Add a script to a XUL document.
|
boolean |
containsScript(org.scripthelper.model.ScriptSource source)
Return true if the factory contains a ScriptSource.
|
java.lang.ClassLoader |
getClassLoader()
Return the classLoader to use to load the script classes
|
java.util.Set<java.lang.Class<?>> |
getInterfaces()
Return the Set of script interfaces which are handled by this factory.
|
ScriptHandle |
getScript(org.scripthelper.model.ScriptSource source)
Return the script associated with a source.
|
XULScriptContext |
getScriptContext()
Return the script context.
|
org.scripthelper.exceptions.ScriptExceptionListener |
getScriptExceptionListener()
Return the script exception listener.
|
org.scripthelper.context.ScriptLogger |
getScriptLogger()
Return the script logger.
|
java.util.Map<org.scripthelper.model.ScriptSource,ScriptHandle> |
getScripts()
Return the scripts.
|
protected short |
getScriptType(org.scripthelper.model.ScriptSource source)
Return the script type for a script source.
|
boolean |
hasScript(java.lang.String name)
Return true if the factory has a script of a specified name.
|
ScriptHandle |
removeScript(org.scripthelper.model.ScriptSource source)
Removed a script.
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
Set the classLoader to use to load the script classes.
|
void |
setScriptContext(XULScriptContext context)
Set the global script context used by all scripts.
|
void |
setScriptExceptionListener(org.scripthelper.exceptions.ScriptExceptionListener exceptionListener)
Set the script exception listener.
|
void |
setScriptLogger(org.scripthelper.context.ScriptLogger scriptLogger)
Set the script logger.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateScriptLanguageFactory, createScriptLanguageFactoryImplprotected java.util.Map<java.lang.Class<?>,ScriptLanguageFactory<?>> langFactories
protected XULScriptContext context
protected org.scripthelper.exceptions.ScriptExceptionListener exceptionListener
protected org.scripthelper.context.ScriptLogger scriptLogger
protected java.lang.ClassLoader classLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
setClassLoader in interface ScriptFactoryclassLoader - the classLoaderpublic java.lang.ClassLoader getClassLoader()
getClassLoader in interface ScriptFactorypublic void setScriptContext(XULScriptContext context)
setScriptContext in interface ScriptFactorycontext - the global script contextpublic XULScriptContext getScriptContext()
getScriptContext in interface ScriptFactorypublic void setScriptExceptionListener(org.scripthelper.exceptions.ScriptExceptionListener exceptionListener)
setScriptExceptionListener in interface ScriptFactoryexceptionListener - the script exception listenerpublic org.scripthelper.exceptions.ScriptExceptionListener getScriptExceptionListener()
getScriptExceptionListener in interface ScriptFactorypublic void setScriptLogger(org.scripthelper.context.ScriptLogger scriptLogger)
setScriptLogger in interface ScriptFactoryscriptLogger - the script loggerpublic org.scripthelper.context.ScriptLogger getScriptLogger()
getScriptLogger in interface ScriptFactorypublic java.util.Map<org.scripthelper.model.ScriptSource,ScriptHandle> getScripts()
getScripts in interface ScriptFactorypublic java.util.Set<java.lang.Class<?>> getInterfaces()
getInterfaces in interface ScriptFactorypublic void addScriptToXUL(java.net.URL url,
XULDocument doc)
addScriptToXUL in interface ScriptFactoryurl - the scriptdoc - the XUL documentpublic ScriptHandle getScript(org.scripthelper.model.ScriptSource source)
getScript in interface ScriptFactorysource - the ScriptSourcepublic boolean containsScript(org.scripthelper.model.ScriptSource source)
containsScript in interface ScriptFactorysource - the ScriptSourcepublic ScriptHandle removeScript(org.scripthelper.model.ScriptSource source)
removeScript in interface ScriptFactorysource - the ScriptSourcepublic void addScriptToDocuments(ScriptHandle script)
addScriptToDocuments in interface ScriptFactoryscript - the script handleprotected short getScriptType(org.scripthelper.model.ScriptSource source)
source - the ScriptSourcepublic ScriptHandle addScript(XULDocument document, org.scripthelper.model.ScriptSource source)
addScript in interface ScriptFactorydocument - the XULDocumentsource - the script sourcepublic ScriptHandle addScript(short scriptType, XULDocument document, org.scripthelper.model.ScriptSource source)
addScript in interface ScriptFactoryscriptType - the script typedocument - the XULDocumentsource - the script sourcepublic boolean hasScript(java.lang.String name)
hasScript in interface ScriptFactoryname - the script nameCopyright © 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence