Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor and description |
---|
LoaderConfiguration
() creates a new loader configuration |
Type | Name and description |
---|---|
void |
addClassPath(String path) Adds a classpath to this configuration. |
void |
addFile(File file) Adds a file to the classpath if it exists. |
void |
addFile(String filename) Adds a file to the classpath if it exists. |
void |
configure(InputStream is) configures this loader with a stream |
URL[] |
getClassPathUrls() The classpath as URL[] from this configuration. |
List<String> |
getGrabUrls() The extra grab configuration. |
String |
getMainClass() Returns the name of the main class for this configuration. |
void |
setMainClass(String classname) Sets the main class. |
void |
setRequireMain(boolean requireMain) Determines if a main class is required when calling. |
Adds a classpath to this configuration. It expects a string with multiple paths, separated by the system dependent path separator. Expands wildcards, e.g. dir/* into all the jars in dir.
path
- the path as a path separator delimited stringAdds a file to the classpath if it exists.
file
- the file to addAdds a file to the classpath if it exists.
filename
- the name of the file to addconfigures this loader with a stream
is
- stream used to read the configurationThe classpath as URL[] from this configuration. This can be used to construct a class loader.
Returns the name of the main class for this configuration.
Sets the main class. If there is already a main class it is overwritten. Calling configure(InputStream) after calling this method does not require a main class definition inside the stream.
classname
- the name to become the main classDetermines if a main class is required when calling.
requireMain
- set to false if no main class is requiredCopyright © 2003-2015 The Apache Software Foundation. All rights reserved.