public static void configure(Object instance, Configuration config)
{
for (Field f : instance.getClass().getDeclaredFields())
{
Configured annotation = f.getAnnotation(Configured.class);
if (annotation != null)
{
setValueInField(f, instance, config, annotation);
}
}