|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.tools.LoaderConfiguration
public class LoaderConfiguration extends java.lang.Object
Class used to configure a RootLoader from a stream or by using it's methods.
The stream can be for example a FileInputStream from a file with the following format:# 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.Constructor Summary | |
LoaderConfiguration()
creates a new loader configuration |
Method Summary | |
---|---|
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
|
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. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
public LoaderConfiguration()
Method Detail |
---|
public void addClassPath(java.lang.String path)
path
- the path as a path separator delimited string
public void addFile(java.io.File file)
file
- the file to add
public void addFile(java.lang.String filename)
filename
- the name of the file to add
public void configure(java.io.InputStream is)
is
- stream used to read the configuration
public java.net.URL[] getClassPathUrls()
public java.util.List getGrabUrls()
public java.lang.String getMainClass()
public void setMainClass(java.lang.String classname)
classname
- the name to become the main class
public void setRequireMain(boolean requireMain)
requireMain
- set to false if no main class is required
Groovy Documentation