public class LoaderConfiguration
extends java.lang.Object
# comment
main is classname
load path
load file
load pathWith${property}
load pathWith!{required.property}
load path/*.jar
load path/**/*.jar
load ./*.jar or load *.jar are not supported.RootLoader| Constructor and Description |
|---|
LoaderConfiguration()
creates a new loader configuration
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClassPath(java.lang.String path)
Adds a classpath to this configuration.
|
void |
addFile(java.io.File file)
Adds a file to the classpath if it exists.
|
void |
addFile(java.lang.String filename)
Adds a file to the classpath if it exists.
|
void |
configure(java.io.InputStream is)
configures this loader with a stream
|
java.net.URL[] |
getClassPathUrls()
The classpath as URL[] from this configuration.
|
java.util.List<java.lang.String> |
getGrabUrls()
The extra grab configuration.
|
java.lang.String |
getMainClass()
Returns the name of the main class for this configuration.
|
void |
setMainClass(java.lang.String classname)
Sets the main class.
|
void |
setRequireMain(boolean requireMain)
Determines if a main class is required when calling.
|
public LoaderConfiguration()
public void configure(java.io.InputStream is)
throws java.io.IOException
is - stream used to read the configurationjava.io.IOException - if reading or parsing the contents of the stream failspublic void addFile(java.io.File file)
file - the file to addpublic void addFile(java.lang.String filename)
filename - the name of the file to addpublic void addClassPath(java.lang.String path)
path - the path as a path separator delimited stringFile.pathSeparatorpublic java.net.URL[] getClassPathUrls()
URLClassLoaderpublic java.util.List<java.lang.String> getGrabUrls()
public java.lang.String getMainClass()
public void setMainClass(java.lang.String classname)
configure(InputStream)
after calling this method does not require a main class
definition inside the stream.classname - the name to become the main classpublic void setRequireMain(boolean requireMain)
requireMain - set to false if no main class is requiredconfigure(InputStream)