|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.dmonix.util.ClassUtil
Miscellaneus utility methods.
Copyright: Copyright (c) 2004
Company: dmonix.org
| Constructor Summary | |
ClassUtil()
|
|
| Method Summary | |
static boolean |
isInterfaceImplemention(java.lang.Class interfaceClass,
java.lang.Class c,
boolean checkParent)
Checks if a class implements the requested interface. |
static boolean |
isInterfaceImplemention(java.lang.String interfaceClass,
java.lang.Class c,
boolean checkParent)
Checks if a class implements the requested interface. |
static void |
openBrowser(java.lang.String url)
Opens the default brower with the supplied URL. |
static java.lang.String |
padNumber(int number,
int length)
Returns a string with a leading zero(es) if the input number is shorter than the requested length. |
static java.lang.String |
padString(java.lang.String s,
int size)
Returns a string with a leading zero(es) if the input string is shorter than the requested length. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ClassUtil()
| Method Detail |
public static boolean isInterfaceImplemention(java.lang.Class interfaceClass,
java.lang.Class c,
boolean checkParent)
checkParent is true then all the the parents
will be checked until either a class that implements the interface or there
are no more parent classes.
interfaceClass - The interface classc - The class to checkcheckParent - true - checks all parents, false checks only the provided class
isInterfaceImplemention(String, Class, boolean)
public static boolean isInterfaceImplemention(java.lang.String interfaceClass,
java.lang.Class c,
boolean checkParent)
checkParent is true then all the the parents
will be checked until either a class that implements the interface or there
are no more parent classes.
interfaceClass - The interface classc - The class to checkcheckParent - true - checks all parents, false checks only the provided class
public static void openBrowser(java.lang.String url)
throws java.lang.ClassNotFoundException,
java.lang.NoSuchMethodException,
java.net.MalformedURLException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
com.sun.javaws.BrowserSupport class
to be included in the classpath.
url - The URL
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
java.net.MalformedURLException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
public static java.lang.String padNumber(int number,
int length)
number - The number to padlength - The requested length of the string
public static java.lang.String padString(java.lang.String s,
int size)
s - The string to padsize - The requested length of the string
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||