|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nanocontainer.script.ScriptedContainerBuilderFactory
public class ScriptedContainerBuilderFactory
The main class for configuration of PicoContainer with various scripting languages. When using the constructors taking a file, the extensions must be one of the following:
Field Summary | |
---|---|
static String |
BEANSHELL
Deprecated. Since NanoContainer RC-2. (14-Dec-2005). Use ScriptBuilderResolver.BEANSHELL instead. |
static String |
GROOVY
Deprecated. Since NanoContainer RC-2. (14-Dec-2005). Use ScriptBuilderResolver.GROOVY instead. |
static String |
JAVASCRIPT
Deprecated. Since NanoContainer RC-2. (14-Dec-2005). Use ScriptBuilderResolver.JAVASCRIPT instead. |
static String |
JYTHON
Deprecated. Since NanoContainer RC-2. (14-Dec-2005). Use ScriptBuilderResolver.JYTHON instead. |
static String |
XML
Deprecated. Since NanoContainer RC-2. (14-Dec-2005). Use ScriptBuilderResolver.XML instead. |
Constructor Summary | |
---|---|
ScriptedContainerBuilderFactory(File compositionFile)
|
|
ScriptedContainerBuilderFactory(File compositionFile,
ClassLoader classLoader)
|
|
ScriptedContainerBuilderFactory(File compositionFile,
ClassLoader classLoader,
ScriptBuilderResolver builderClassResolver)
Added since Nano RC-2. |
|
ScriptedContainerBuilderFactory(Reader composition,
String builderClass)
|
|
ScriptedContainerBuilderFactory(Reader composition,
String builderClass,
ClassLoader classLoader)
Allows you to create a factory that isntantiats the builder class you desire. |
|
ScriptedContainerBuilderFactory(URL compositionURL)
|
|
ScriptedContainerBuilderFactory(URL compositionURL,
ClassLoader classLoader,
ScriptBuilderResolver builderClassResolver)
Added since Nano RC-2. |
|
ScriptedContainerBuilderFactory(URL compositionURL,
String builderClassName,
ClassLoader contextClassLoader)
|
Method Summary | |
---|---|
static String |
getBuilderClassName(String extension)
Deprecated. Since NanoContainer 1.0 RC-2. Use the class ScriptBuilderResolver for this functionality. |
ScriptedContainerBuilder |
getContainerBuilder()
Retrieve the created container builder instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String GROOVY
public static final String BEANSHELL
public static final String JAVASCRIPT
public static final String JYTHON
public static final String XML
Constructor Detail |
---|
public ScriptedContainerBuilderFactory(File compositionFile, ClassLoader classLoader) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public ScriptedContainerBuilderFactory(File compositionFile, ClassLoader classLoader, ScriptBuilderResolver builderClassResolver) throws IOException, ClassNotFoundException, UnsupportedScriptTypeException
compositionFile
- File The script file.classLoader
- ClassLoader for class resolution once we resolve what the name of the
builder should be..builderClassResolver
- ScriptBuilderResolver the resolver for figuring out
file names to container builder class names.
IOException
- upon java.io.File name resolution error.
ClassNotFoundException
- If there is an error loading
the specified builder using the specified classloader.
UnsupportedScriptTypeException
- if the extension of the file
does not match that of any known script.public ScriptedContainerBuilderFactory(File compositionFile) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public ScriptedContainerBuilderFactory(URL compositionURL) throws ClassNotFoundException
ClassNotFoundException
public ScriptedContainerBuilderFactory(URL compositionURL, ClassLoader classLoader, ScriptBuilderResolver builderClassResolver) throws ClassNotFoundException, UnsupportedScriptTypeException
compositionURL
- The script URL.builderClassResolver
- ScriptBuilderResolver the resolver for figuring out
file names to container builder class names.classLoader
- ClassLoader for class resolution once we resolve what the name of the
builder should be..
ClassNotFoundException
- If there is an error loading
the specified builder using the specified classloader.
UnsupportedScriptTypeException
- if the extension of the file
does not match that of any known script.public ScriptedContainerBuilderFactory(URL compositionURL, String builderClassName, ClassLoader contextClassLoader) throws ClassNotFoundException
ClassNotFoundException
public ScriptedContainerBuilderFactory(Reader composition, String builderClass) throws ClassNotFoundException
ClassNotFoundException
public ScriptedContainerBuilderFactory(Reader composition, String builderClass, ClassLoader classLoader) throws ClassNotFoundException
composition
- Reader the script you wish to create the builder for.builderClass
- String the builder class that instantiate.classLoader
- ClassLoader the classloader to use for instantiation.
ClassNotFoundException
- if the specified class cannot be found.Method Detail |
---|
public static String getBuilderClassName(String extension)
extension
- String the file extension to res
public ScriptedContainerBuilder getContainerBuilder()
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |