Collection<Injector> list = new ArrayList<Injector>();
Field fields[] = cls.getDeclaredFields();
for(Field field : fields)
{
BeanProperty property = new FieldBeanProperty(field);
list.addAll(propertyProcessor.process(property));
}
Method methods[] = cls.getDeclaredMethods();
for(Method method : methods)
{
// TODO: this I don't like. I want to scan for annotation first and then verify the method,
// so I can properly inform users of errors.
if(MethodBeanProperty.isValid(method))
{
BeanProperty property = new MethodBeanProperty(method);
list.addAll(propertyProcessor.process(property));
}
}
return list;