|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.acciente.induction.util.ReflectUtils
public class ReflectUtils
Internal. Some useful reflection methods. (It is not convincing enough at this time that these methods are general enough to be promoted to the com.acciente.reflect package)
Constructor Summary | |
---|---|
ReflectUtils()
|
Method Summary | |
---|---|
static Constructor |
getNoArgConstructor(Class oClass)
This method introspects into the specified class and checks if the class has a public constructor with formal parameters (i.e. |
static Constructor |
getSingletonConstructor(Class oClass)
This method introspects into the specified class and checks if the class has only one public constructor. |
static Method |
getSingletonMethod(Class oClass,
String sMethodName)
This method introspects into the specified class and checks if the class has only one public method with the specified name. |
static Method |
getSingletonMethod(Class oClass,
String sMethodName,
boolean bIgnoreCase)
This method introspects into the specified class and checks if the class has only one public method with the specified name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectUtils()
Method Detail |
---|
public static Constructor getSingletonConstructor(Class oClass) throws ConstructorNotFoundException
oClass
- the class to introspect into
ConstructorNotFoundException
- if there are no public constructors or if
there is more than one public constructorpublic static Constructor getNoArgConstructor(Class oClass) throws ConstructorNotFoundException
oClass
- the class to introspect into
ConstructorNotFoundException
- if there are no no-arg constructorspublic static Method getSingletonMethod(Class oClass, String sMethodName) throws MethodNotFoundException
oClass
- the class to introspect intosMethodName
- the name of the method (case-sensitive)
MethodNotFoundException
- if there are no public methods with the specified name or if
there is more than one public method with the specified namepublic static Method getSingletonMethod(Class oClass, String sMethodName, boolean bIgnoreCase) throws MethodNotFoundException
oClass
- the class to introspect intosMethodName
- the name of the methodbIgnoreCase
- true if the method search should be case-sensitive
MethodNotFoundException
- if there are no public methods with the specified name or if
there is more than one public method with the specified name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |