|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.repository.main.Bootstrapper
Application and component bootstrapper used to instantiate, and or invoke Classes and their methods within newly constructed Repository ClassLoaders.
Constructor Summary | |
Bootstrapper(Repository a_repository,
Artifact artifact)
Creates a Bootstrapper for a specific target artifact. |
Method Summary | |
ClassLoader |
getClassLoader()
Gets the ClassLoader used by this Bootstrapper. |
String |
getConstructor(String main)
Gets the name of the constructor given the fully qualified class name. |
Object |
invoke(Object a_obj,
String a_method,
String[] a_argTypes,
Object[] a_args)
Invokes a method on an object. |
Object |
invoke(String main,
String a_method,
String[] a_types,
Object[] a_args)
Invokes a static method on a class. |
Class |
loadClass(String main)
Loads a class using the ClassLoader created by the Repository. |
static void |
main(String[] a_args)
Main wrapper. |
void |
main(String main,
String[] a_args)
Invokes the main application entry point for a class. |
Object |
newInstance(String main)
Creates a new instance of a class using the default constructor. |
Object |
newInstance(String main,
String[] a_types,
Object[] a_args)
Creates a new instance of a class using a constructor taking arguments. |
void |
run(String main)
Instantiates a runnable using a default constructor and calls its run method. |
String |
toSignature(String a_method,
String[] a_types)
Constructs a String representing the signature of an method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Bootstrapper(Repository a_repository, Artifact artifact) throws RepositoryException
Method Detail |
public ClassLoader getClassLoader()
public void main(String main, String[] a_args) throws RepositoryException
a_args
- the arguments to pass-thro to the main of the application
RepositoryException
- on any class loading or invocation failurespublic void run(String main) throws RepositoryException
main
- the fully qualified class name of the Runnable
RepositoryException
- on any class loading or invokation failurespublic Object invoke(String main, String a_method, String[] a_types, Object[] a_args) throws RepositoryException
main
- the fully qualified class namea_method
- the name of the method to invokea_types
- the fqcn of the parametersa_args
- the arguments to the method
RepositoryException
public Object newInstance(String main) throws RepositoryException
main
- the fully qualified name of the class to create an inst of
RepositoryException
- if the instantiation failspublic Object newInstance(String main, String[] a_types, Object[] a_args) throws RepositoryException
main
- the fully qualified name of the class to create an inst ofa_types
- the fully qualified names of constructor parameter typesa_args
- the arguments to the constructor
RepositoryException
- if the instantiation failspublic String getConstructor(String main)
main
- the fully qualified class name
public Object invoke(Object a_obj, String a_method, String[] a_argTypes, Object[] a_args) throws RepositoryException
a_obj
- the object to invoke a method ona_method
- the method to invokea_argTypes
- the fqcn of the parametersa_args
- the arguments to method
RepositoryException
public Class loadClass(String main) throws RepositoryException
main
- the fully qualified class name
RepositoryException
- if the class could not be foundpublic String toSignature(String a_method, String[] a_types)
a_method
- the name of the methoda_types
- the fully qualified class names of the method parameters
public static void main(String[] a_args)
a_args
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |