| java.lang.Object org.apache.catalina.tribes.demos.IntrospectionUtils
IntrospectionUtils | final public class IntrospectionUtils (Code) | | Utils for introspection and reflection
|
Inner Class :public static interface PropertySource | |
Inner Class :public static interface AttributeHolder | |
Method Summary | |
public static void | addJarsFromClassPath(Vector jars, String cp) Add elements from the classpath cp to a Vector jars as
file URLs (We use Vector for JDK 1.1 compat). | public static void | addToClassPath(Vector cpV, String dir) Add all the jar files in a dir to the classpath, represented as a Vector
of URLs. | public static void | addToolsJar(Vector v) | public static void | callMain(Class c, String args) | public static Object | callMethod0(Object target, String methodN) | public static Object | callMethod1(Object target, String methodN, Object param1, String typeParam1, ClassLoader cl) | public static Object | callMethodN(Object target, String methodN, Object params, Class typeParams) | public static String | capitalize(String name) | public static String | classPathAdd(URL urls, String cp) Adds classpath entries from a vector of URL's to the "tc_path_add" System
property. | public static void | clear() | public static Object | convert(String object, Class paramType) | static void | d(String s) | public static void | displayClassPath(String msg, URL[] cp) | public static void | execute(Object proxy, String method) | public static String[] | findBooleanSetters(Class c) | public static Method | findMethod(Class c, String name, Class params) | public static Method[] | findMethods(Class c) | public static String[] | findVoidSetters(Class c) | public static Object | getAttribute(Object proxy, String n) | public static URL[] | getClassPath(Vector v) | public static URL[] | getClassPath(String dir, String cpath, String cpathProp, boolean addTools) Construct a URL classpath from files in a directory, a cpath property,
and tools.jar. | public static String[] | getFilesByExt(String ld, String ext) | public static Object | getProperty(Object o, String name) | public static URL | getURL(String base, String file) | public static ClassLoader | getURLClassLoader(URL urls, ClassLoader parent) Construct a URLClassLoader. | public static String | guessInstall(String installSysProp, String homeSysProp, String jarName) | public static String | guessInstall(String installSysProp, String homeSysProp, String jarName, String classFile) Guess a product install/home by analyzing the class path. | public static boolean | hasHook(Object obj, String methodN) | public static boolean | processArgs(Object proxy, String args) | public static boolean | processArgs(Object proxy, String args, String args0, String args1, Hashtable aliases) | public static String | replaceProperties(String value, Object getter) | public static String | replaceProperties(String value, Hashtable staticProp, PropertySource dynamicProp) | public static void | setAttribute(Object proxy, String n, Object v) | public static void | setProperty(Object o, String name, String value) Find a method with the right name If found, call the method ( if param is
int or boolean we'll convert value to the right type before) - that means
you can have setDebug(1). | public static void | setProperty(Object o, String name) | public static String | unCapitalize(String name) |
addJarsFromClassPath | public static void addJarsFromClassPath(Vector jars, String cp) throws IOException, MalformedURLException(Code) | | Add elements from the classpath cp to a Vector jars as
file URLs (We use Vector for JDK 1.1 compat).
Parameters: jars - The jar list Parameters: cp - a String classpath of directory or jar file elementsseparated by path.separator delimiters. throws: IOException - If an I/O error occurs throws: MalformedURLException - Doh ;) |
addToClassPath | public static void addToClassPath(Vector cpV, String dir)(Code) | | Add all the jar files in a dir to the classpath, represented as a Vector
of URLs.
|
capitalize | public static String capitalize(String name)(Code) | | Reverse of Introspector.decapitalize
|
classPathAdd | public static String classPathAdd(URL urls, String cp)(Code) | | Adds classpath entries from a vector of URL's to the "tc_path_add" System
property. This System property lists the classpath entries common to web
applications. This System property is currently used by Jasper when its
JSP servlet compiles the Java file for a JSP.
|
clear | public static void clear()(Code) | | |
displayClassPath | public static void displayClassPath(String msg, URL[] cp)(Code) | | Debug method, display the classpath
|
getClassPath | public static URL[] getClassPath(Vector v)(Code) | | Return a URL[] that can be used to construct a class loader
|
getFilesByExt | public static String[] getFilesByExt(String ld, String ext)(Code) | | Return all files with a given extension in a dir
|
getURL | public static URL getURL(String base, String file)(Code) | | Construct a file url from a file, using a base dir
|
getURLClassLoader | public static ClassLoader getURLClassLoader(URL urls, ClassLoader parent)(Code) | | Construct a URLClassLoader. Will compile and work in JDK1.1 too.
|
guessInstall | public static String guessInstall(String installSysProp, String homeSysProp, String jarName, String classFile)(Code) | | Guess a product install/home by analyzing the class path. It works for
product using the pattern: lib/executable.jar or if executable.jar is
included in classpath by a shell script. ( java -jar also works )
Insures both "install" and "home" System properties are set. If either or
both System properties are unset, "install" and "home" will be set to the
same value. This value will be the other System property that is set, or
the guessed value if neither is set.
|
hasHook | public static boolean hasHook(Object obj, String methodN)(Code) | | Test if the object implements a particular
method
|
replaceProperties | public static String replaceProperties(String value, Object getter)(Code) | | Replace ${NAME} with the property value
|
replaceProperties | public static String replaceProperties(String value, Hashtable staticProp, PropertySource dynamicProp)(Code) | | Replace ${NAME} with the property value
|
setProperty | public static void setProperty(Object o, String name, String value)(Code) | | Find a method with the right name If found, call the method ( if param is
int or boolean we'll convert value to the right type before) - that means
you can have setDebug(1).
|
|
|