|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.p6spy.engine.common.P6Util
public class P6Util
Constructor Summary | |
---|---|
P6Util()
|
Method Summary | |
---|---|
static int |
atoi(Object s)
|
static File |
classLoadPropertyFile(URL purl)
|
static String |
classPathFile(String file)
Here we attempt to find the file in the current dir and the classpath If we can't find it then we return null |
static String |
dynamicGet(Class klass,
String property)
A utility for dynamically getting the value of a given static class method |
static Collection |
dynamicGetOptions(Class klass)
|
static void |
dynamicSet(Class klass,
String property,
String value)
A utility for dynamically setting the value of a given static class method |
static long |
elapsed(Date start)
|
static ArrayList |
findAllMethods(Class klass)
|
static Class |
forName(String name)
A utiltity for using the current class loader (rather than the system class loader) when instantiating a new class. |
static Object |
get(Class klass,
String method)
|
protected static String |
getCheckedPath()
|
protected static String |
getClassPathAsString(ClassLoader classLoader)
|
static String |
getPath(URL theURL)
|
static PrintStream |
getPrintStream(String file,
boolean append)
|
static boolean |
isTrue(String s,
boolean defaultValue)
|
static Properties |
loadProperties(String file)
|
static ArrayList |
loadProperties(String file,
String prefix)
|
static int |
parseInt(String i,
int defaultValue)
|
static long |
parseLong(String l,
long defaultValue)
|
protected static void |
removeDots(Properties props)
|
static ArrayList |
reverseArrayList(ArrayList arraylist)
|
static void |
set(Class klass,
String method,
Object[] args)
|
static Date |
timeNow()
|
static String |
timeTaken(Date start,
String msg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public P6Util()
Method Detail |
---|
public static int parseInt(String i, int defaultValue)
public static long parseLong(String l, long defaultValue)
public static boolean isTrue(String s, boolean defaultValue)
public static int atoi(Object s)
public static Properties loadProperties(String file)
protected static void removeDots(Properties props)
protected static String getCheckedPath()
protected static String getClassPathAsString(ClassLoader classLoader)
public static ArrayList loadProperties(String file, String prefix)
public static ArrayList reverseArrayList(ArrayList arraylist)
public static String classPathFile(String file)
public static File classLoadPropertyFile(URL purl)
public static Date timeNow()
public static PrintStream getPrintStream(String file, boolean append) throws IOException
IOException
public static String timeTaken(Date start, String msg)
public static long elapsed(Date start)
public static Class forName(String name) throws ClassNotFoundException
The idea is that the thread's current loader might have an obscure notion of what your class path is (e.g. an app server) that will not be captured properly by the system class loader.
taken from http://sourceforge.net/forum/message.php?msg_id=1720229
name
- class name to load
ClassNotFoundException
public static void dynamicSet(Class klass, String property, String value)
public static void set(Class klass, String method, Object[] args) throws IntrospectionException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
IntrospectionException
IllegalAccessException
NoSuchMethodException
InvocationTargetException
public static String dynamicGet(Class klass, String property)
public static Object get(Class klass, String method) throws IntrospectionException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
IntrospectionException
IllegalAccessException
NoSuchMethodException
InvocationTargetException
public static Collection dynamicGetOptions(Class klass)
public static ArrayList findAllMethods(Class klass) throws IntrospectionException
IntrospectionException
public static String getPath(URL theURL)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |