|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.util.Reflect
public class Reflect
This class has convenience methods to find the fields on a class and superclass as well as methods to check the class type of members in a collection
Constructor Summary | |
---|---|
Reflect(java.lang.Class parametrizedClass)
|
Method Summary | |
---|---|
static java.util.List<java.lang.reflect.Field> |
getAllFields(java.lang.Class<?> fieldClass)
This method return all the fields (including private) from the given class and its super classes. |
java.util.List<java.lang.reflect.Field> |
getInheritedFields(java.lang.Class subClass)
This method return all the fields (including private) until the given parameterized class |
boolean |
hasField(java.lang.reflect.Field field)
|
static boolean |
isCollection(java.lang.Class<?> fieldClass)
|
static boolean |
isCollection(java.lang.Object object)
|
boolean |
isCollectionField(java.lang.reflect.Field field)
This method validate the given field is Collection and the elements should be of parameterized type |
boolean |
isSuperClass(java.lang.Class subClass)
|
boolean |
isSuperClass(java.lang.Object object)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reflect(java.lang.Class parametrizedClass)
parametrizedClass
- ClassMethod Detail |
---|
public static boolean isCollection(java.lang.Class<?> fieldClass)
fieldClass
-
public static boolean isCollection(java.lang.Object object)
object
- Object
public static java.util.List<java.lang.reflect.Field> getAllFields(java.lang.Class<?> fieldClass)
fieldClass
- Class
public boolean isSuperClass(java.lang.Class subClass)
subClass
- Class
public boolean isSuperClass(java.lang.Object object)
object
- Object
public boolean isCollectionField(java.lang.reflect.Field field)
field
- Field
public java.util.List<java.lang.reflect.Field> getInheritedFields(java.lang.Class subClass)
subClass
- Class
public boolean hasField(java.lang.reflect.Field field)
field
-
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |