com.p6spy.engine.common
Class P6Util
java.lang.Object
|
+--com.p6spy.engine.common.P6Util
- public class P6Util
- extends java.lang.Object
Method Summary |
static int |
atoi(java.lang.Object s)
|
static void |
checkJavaProperties()
|
static java.lang.String |
classPathFile(java.lang.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 long |
elapsed(java.util.Date start)
|
static java.util.ArrayList |
findAllMethods(java.lang.Class klass)
|
static java.lang.Object |
get(java.lang.Class klass,
java.lang.String method)
|
static java.io.PrintStream |
getPrintStream(java.lang.String file,
boolean append)
|
static boolean |
isTrue(java.lang.String s,
boolean defaultValue)
|
static java.util.Properties |
loadProperties(java.lang.String file)
|
static java.util.ArrayList |
loadProperties(java.lang.String file,
java.lang.String prefix)
|
static int |
parseInt(java.lang.String i,
int defaultValue)
|
static long |
parseLong(java.lang.String l,
long defaultValue)
|
static java.util.ArrayList |
reverseArrayList(java.util.ArrayList arraylist)
|
static void |
set(java.lang.Class klass,
java.lang.String method,
java.lang.Object[] args)
|
static java.util.Date |
timeNow()
|
static java.lang.String |
timeTaken(java.util.Date start,
java.lang.String msg)
|
static void |
warn(java.lang.String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
P6Util
public P6Util()
parseInt
public static int parseInt(java.lang.String i,
int defaultValue)
parseLong
public static long parseLong(java.lang.String l,
long defaultValue)
isTrue
public static boolean isTrue(java.lang.String s,
boolean defaultValue)
atoi
public static int atoi(java.lang.Object s)
loadProperties
public static java.util.Properties loadProperties(java.lang.String file)
loadProperties
public static java.util.ArrayList loadProperties(java.lang.String file,
java.lang.String prefix)
reverseArrayList
public static java.util.ArrayList reverseArrayList(java.util.ArrayList arraylist)
classPathFile
public static java.lang.String classPathFile(java.lang.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
warn
public static void warn(java.lang.String s)
checkJavaProperties
public static void checkJavaProperties()
timeNow
public static java.util.Date timeNow()
getPrintStream
public static java.io.PrintStream getPrintStream(java.lang.String file,
boolean append)
throws java.io.IOException
timeTaken
public static java.lang.String timeTaken(java.util.Date start,
java.lang.String msg)
elapsed
public static long elapsed(java.util.Date start)
findAllMethods
public static java.util.ArrayList findAllMethods(java.lang.Class klass)
throws java.beans.IntrospectionException
set
public static void set(java.lang.Class klass,
java.lang.String method,
java.lang.Object[] args)
throws java.beans.IntrospectionException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
get
public static java.lang.Object get(java.lang.Class klass,
java.lang.String method)
throws java.beans.IntrospectionException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException