I have few classes that I need to annotate with a name so I defined my annotation as
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @i
Just get the annotation object and pull out the value
Map tmpMap = new HashMap();
JsonUnmarshallable ann;
for (T o : applicationContext.getBeansWithAnnotation(annotationType).values()) {
ann = o.getClass().getAnnotation(JsonUnmarshallable.class);
tmpMap.put(ann.value(),o);
}
return o;
Let me know if that's not clear.