Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.host.util
Class LaunchHelper

java.lang.Object
  extended by org.apache.tuscany.host.util.LaunchHelper

public final class LaunchHelper
extends Object

Version:
$Rev: 449155 $ $Date: 2006-09-22 21:30:29 -0700 (Fri, 22 Sep 2006) $

Method Summary
static Object invoke(Object instance, String name, Class<?>[] paramTypes, Object... args)
          Invoke a method on an object.
static URL[] scanDirectoryForJars(File lib)
          Scan a directory for jar files to be added to the classpath.
static void setProperty(Object instance, String name, Object value)
          Set a JavaBean property on an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

scanDirectoryForJars

public static URL[] scanDirectoryForJars(File lib)
Scan a directory for jar files to be added to the classpath.

Parameters:
lib - the directory to scan
Returns:
the URLs or jar files in that directory

setProperty

public static void setProperty(Object instance,
                               String name,
                               Object value)
Set a JavaBean property on an object.

Parameters:
instance - the object whose property should be set
name - the name of the property
value - the value to set it to

invoke

public static Object invoke(Object instance,
                            String name,
                            Class<?>[] paramTypes,
                            Object... args)
                     throws InvocationTargetException
Invoke a method on an object.

Parameters:
instance - the object to invoke
name - the name of the method to invoke
args - arguments to call the method with
Returns:
the value returned by the method
Throws:
InvocationTargetException - if the method throw an Exception

Apache Tuscany SCA Kernel Sub-Project

-