import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
List<Field> fields = ReflectionUtils.getAllFields(aClass);
for (Field field : fields) {
if (field.isAnnotationPresent(aAnnotation)) {
List<Field> fields = ReflectionUtils.getAllFields(aClass);
for (Field field : fields) {
if (field.isAnnotationPresent(aAnnotation)) {
Class returnType = method.getReturnType();
Method setter = method.getDeclaringClass()
.getDeclaredMethod(setterName, returnType);
Class returnType = method.getReturnType();
Method setter = method.getDeclaringClass()
.getDeclaredMethod(setterName, returnType);
} catch (NoSuchMethodException e) {
throw new RuntimeException("Error obtaining setter for " +
method.getName() + " in class " + aClass.getName(), e);
}
}
}
} catch (NoSuchMethodException e) {
throw new RuntimeException("Error obtaining setter for " +
method.getName() + " in class " + aClass.getName(), e);
}
}
}