shared.metaclass
Class Loader

java.lang.Object
  extended by shared.metaclass.Loader

public class Loader
extends Object

A facility providing a way for programs to take advantage of Jars and native libraries found on the class path. To use it, one annotates a target class with resource descriptions specifying the Jars and native libraries to be loaded.


Nested Class Summary
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.
 
Method Summary
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 flag set to true.
static void run(String targetName, Object invocationArg, boolean useDelegation)
          The entry point for Loader when invoked programmatically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
                 throws Exception
The entry point for Loader when invoked as a Java process.

Throws:
Exception - when something goes awry.

run

public static void run(String targetName,
                       Object invocationArg)
                throws Exception
Delegates to run(String, Object, boolean) with the class loader delegation flag set to true.

Throws:
Exception - when something goes awry.

run

public static void run(String targetName,
                       Object invocationArg,
                       boolean useDelegation)
                throws Exception
The entry point for Loader when invoked programmatically.

Parameters:
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.
Throws:
Exception - when something goes awry.