|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectr01f.reflection.BeanInstanceReflection
public class BeanInstanceReflection
| Field Summary | |
|---|---|
private java.lang.Object |
_bean
|
private java.lang.Class<?> |
_beanType
|
| Constructor Summary | |
|---|---|
BeanInstanceReflection(java.lang.Class<?> beanType,
java.lang.Object bean)
|
|
| Method Summary | ||
|---|---|---|
FieldReflection |
field(java.lang.reflect.Field field)
Obtiene un campo (miembro) del bean |
|
FieldReflection |
field(java.lang.String fieldName)
Obtiene un campo (miembro) del bean |
|
FieldAnnotatedReflection<? extends java.lang.annotation.Annotation>[] |
fieldsAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Obtiene un campo (miembro) del bean anotado con una determinada anotacion |
|
|
instance()
Devuelve el bean instanciado |
|
MethodInvokeReflection |
method(java.lang.reflect.Method method)
Obtiene un wrapper para la invocación del método |
|
MethodInvokeReflection |
method(java.lang.String methodName)
Busca el metodo que se pasa como parameto, recorriendo toda la jerarquia de herencia PROBLEMA: class.getMethods() devuelve solo metodos PUBLICOS class.getDeclaredMethods() devuelve metodos publicos y privados declarados |
|
MethodInvokeReflection |
method(java.lang.String methodName,
java.lang.Class<?>... paramTypes)
Busca el metodo que se pasa como parameto, recorriendo toda la jerarquia de herencia PROBLEMA: class.getMethods() devuelve solo metodos PUBLICOS class.getDeclaredMethods() devuelve metodos publicos y privados declarados |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.Class<?> _beanType
private java.lang.Object _bean
| Constructor Detail |
|---|
public BeanInstanceReflection(java.lang.Class<?> beanType,
java.lang.Object bean)
| Method Detail |
|---|
public MethodInvokeReflection method(java.lang.String methodName)
methodName - El nombre del metodo
ReflectionException - NoSuchMethodException si no se encuentra el metodo
public MethodInvokeReflection method(java.lang.String methodName,
java.lang.Class<?>... paramTypes)
methodName - El nombre del metodoparamTypes - Los tipos de los parametros
ReflectionException - NoSuchMethodException si no se encuentra el metodopublic MethodInvokeReflection method(java.lang.reflect.Method method)
public <T> T instance()
public FieldReflection field(java.lang.String fieldName)
public FieldReflection field(java.lang.reflect.Field field)
public FieldAnnotatedReflection<? extends java.lang.annotation.Annotation>[] fieldsAnnotatedWith(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
annotationType - anotación
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||