public class ClassPathSupport extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ClassPathSupport.Selector
|
Modifier and Type | Method and Description |
---|---|
static ClassPath |
createClassPath(FileObject... roots)
Create ClassPath for the given array of class path roots
|
static ClassPath |
createClassPath(List<? extends PathResourceImplementation> entries)
Create ClassPath for the given list of
PathResourceImplementation entries. |
static ClassPath |
createClassPath(String jvmPath)
Convenience method to create a classpath object from a conventional string representation.
|
static ClassPath |
createClassPath(URL... roots)
Create ClassPath for the given array of class path roots
|
static ClassPathImplementation |
createClassPathImplementation(List<? extends PathResourceImplementation> entries)
Create ClassPathImplementation for the given list of
PathResourceImplementation entries. |
static ClassPath |
createMultiplexClassPath(ClassPathSupport.Selector selector)
|
static ClassPath |
createProxyClassPath(ClassPath... delegates)
Creates read only proxy ClassPath for given delegates.
|
static ClassPathImplementation |
createProxyClassPathImplementation(ClassPathImplementation... delegates)
Creates read only proxy ClassPathImplementation for given delegates.
|
static PathResourceImplementation |
createResource(URL url)
Creates leaf PathResourceImplementation.
|
public static PathResourceImplementation createResource(URL url)
url
- the root of the resource. The URL must refer to folder. In the case of archive file
the jar protocol URL must be used. The folder URL has to end with '/' The FileUtil.urlForArchiveOrDir(java.io.File)
can be used to create folder URLs.public static ClassPathImplementation createClassPathImplementation(List<? extends PathResourceImplementation> entries)
PathResourceImplementation
entries.entries
- list of PathResourceImplementation
instances;
cannot be null; can be emptypublic static ClassPath createClassPath(List<? extends PathResourceImplementation> entries)
PathResourceImplementation
entries.entries
- list of PathResourceImplementation
instances;
cannot be null; can be emptypublic static ClassPath createClassPath(FileObject... roots)
roots
- array of fileobjects which must correspond to directory.
In the case of archive file, the FileObject representing the root of the
archive must be used. Cannot be null; can be empty array; array can contain nulls.public static ClassPath createClassPath(URL... roots)
roots
- array of URLs which must correspond to folder.
In the case of archive file, the jar protocol URL must be used.
The folder URL has to end with '/'. The FileUtil.urlForArchiveOrDir(java.io.File)
can be used to create folder URLs.
Cannot be null; can be empty array; array can contain nulls.public static ClassPath createClassPath(String jvmPath) throws IllegalArgumentException
jvmPath
- a JVM-style classpath (folder or archive paths separated by File.pathSeparator
)IllegalArgumentException
- in case a path entry looks to be invalidFileUtil.urlForArchiveOrDir(java.io.File)
,
ClassPath#toJVMPath
public static ClassPathImplementation createProxyClassPathImplementation(ClassPathImplementation... delegates)
delegates
- ClassPathImplementations to delegate to.public static ClassPath createProxyClassPath(ClassPath... delegates)
delegates
- ClassPaths to delegate to.