}
private static Method getConfigurationMethod(Class<?> klass) {
Method[] methods = klass.getMethods();
for (Method m : methods) {
Configuration conf = m.getAnnotation(Configuration.class);
if (conf != null) {
return m;
}
}
throw new IllegalArgumentException(klass.getName() + " has no @Configuration method");