Function<Class<?>, String> {
public String apply(Class<?> u) {
if (u.isArray()) {
u = u.getComponentType();
}
Component c = u.getAnnotation(Component.class);
if (c == null) {
log.debug("Injected component with no @Component annotation: "
+ u.getSimpleName());
return Component.DEFAULT_MODULE;
} else {
return c.module();
}
}