|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
org.basex.build.fs.parser.Loader
public final class Loader
Some utility methods for loading class files from folders, packages or jar files.
| Method Summary | |
|---|---|
static java.lang.Class<?>[] |
load(java.lang.Package pkg,
java.lang.Class<?> superClass)
Load all subclasses of superClass from the package
pkg. |
static java.lang.Class<?>[] |
load(java.lang.Package pkg,
java.util.regex.Pattern fileNamePat)
Load some classes from a package that is on the classpath. |
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.Class<?>[] load(java.lang.Package pkg,
java.lang.Class<?> superClass)
throws java.io.IOException
Load all subclasses of superClass from the package
pkg. The classes may either be in a directory or inside a java
archive file. If one of the classes is already loaded, nothing is done (but
the class will be included in the results).
superClass may be an abstract class, an interface or a regular
class. Every class inside the package pkg that implements the
interface or extends the class is loaded.
This method breaks after the first error. Subsequent classes are not loaded.
pkg - the package to load the classes from.superClass - either the interface that has to be implemented by the
classes or a class that has to be extended.
java.io.IOException - if the classes are located inside a JAR file and any
error occurs while reading from this file.
public static java.lang.Class<?>[] load(java.lang.Package pkg,
java.util.regex.Pattern fileNamePat)
throws java.io.IOException
Load some classes from a package that is on the classpath. The classes may either be in a directory or inside a java archive file. If one of the classes is already loaded, nothing is done (but the class will be included in the results).
This method breaks after the first error. Subsequent classes are not loaded.
pkg - the package to load the classes from.fileNamePat - the pattern used for matching the class names.
java.io.IOException - if the classes are located inside a JAR file and any
error occurs while reading from this file.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||