| java.lang.Object | |
| ↳ | com.davidluoye.support.utils.Reflect |
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Reflect(Object instance) | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| <T> T |
call(Class<?> ownerClazz, String name, Class[]<?> parameterTypes, Object[] parameters)
reflect a function and get the return value.
| ||||||||||
| <T> T |
call(String name, Class[]<?> parameterTypes, Object[] parameters)
reflect a function and get the return value.
| ||||||||||
| static <T> T |
callStaticMethod(Method method, Object[] parameters)
reflect a static function and get the return value.
| ||||||||||
| <T extends Annotation> T |
getAnnotation(Class<T> annotationType)
reflect an annotation.
| ||||||||||
| <T extends Annotation> T | getAnnotation(Class<?> ownerClazz, Class<T> annotationType) | ||||||||||
| <T> T |
getField(Class<?> ownerClazz, String name)
reflect a field and get the value.
| ||||||||||
| <T> T | getField(String name) | ||||||||||
| static <T> T | getStaticField(ClassLoader loader, String ownerClass, String name, T defValue) | ||||||||||
| static <T> T |
getStaticField(Class<?> ownerClazz, String name)
reflect a static field.
| ||||||||||
| static Method | getStaticMethod(Class<?> ownerClazz, String name, Class[]<?> parameterTypes) | ||||||||||
| static Class<?> | loadClass(ClassLoader loader, String className) | ||||||||||
| static Class<?> | loadClass(String className) | ||||||||||
| boolean |
setField(Class<?> ownerClazz, String name, Object value)
set a class member by reflect
| ||||||||||
| boolean | setField(String name, Object value) | ||||||||||
| static <T> T |
translate(Object obj)
for translate object translate a special type.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
reflect a function and get the return value.
reflect a function and get the return value.
reflect a static function and get the return value.
reflect an annotation.
reflect a field and get the value.
reflect a static field.
set a class member by reflect
for translate object translate a special type.