public class Loader extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Loader.EntryPoint
A marker annotation for the entry point of a program after resource acquisition.
|
static interface |
Loader.LoadableResources
An annotation in support of resource loading.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args)
The entry point for
Loader when invoked as a Java process. |
static void |
run(String targetName,
Object invocationArg)
Delegates to
run(String, Object, boolean) with the class loader delegation option set to true . |
static void |
run(String targetName,
Object invocationArg,
boolean useDelegation)
The entry point for
Loader when invoked programmatically. |
protected static String |
toPathname(String resourceName)
Converts the given resource name into a class pathname.
|
public static void main(String[] args) throws Exception
Loader
when invoked as a Java process.Exception
- when something goes awry.public static void run(String targetName, Object invocationArg) throws Exception
run(String, Object, boolean)
with the class loader delegation option set to true
.Exception
- when something goes awry.public static void run(String targetName, Object invocationArg, boolean useDelegation) throws Exception
Loader
when invoked programmatically.targetName
- the target class.invocationArg
- the invocation argument.useDelegation
- whether to use the class loader gotten by Thread.getContextClassLoader()
or null
as
the underlying RegistryClassLoader
's parent.Exception
- when something goes awry.protected static final String toPathname(String resourceName)
resourceName
- the resource name.