Map<String, ComponentNameTransformer> transformers = new HashMap<String, ComponentNameTransformer>();
for (Class<?> c : reflections.getTypesAnnotatedWith(Transformer.class)) {
if (Arrays.asList(c.getInterfaces()).contains(ComponentNameTransformer.class)) {
CtClass ctclass = classPool.getCtClass(c.getName());
Transformer transformer = (Transformer) ctclass.getAnnotation(Transformer.class);
transformers.put(transformer.value(), (ComponentNameTransformer) c.newInstance());
}
}
return transformers;
}