annotations = new HashSet<Annotation>();
mappedAnnotations = new HashMap<Class<? extends Annotation>, Annotation>();
for (Annotation a : decorated.getAnnotations()) {
// Replace all annotations that define JmsDestination with the actual
// JmsDestination so we can produce them generically
JmsDestination d = a.annotationType().getAnnotation(JmsDestination.class);
if (d != null) {
mappedAnnotations.put(a.getClass(), null);
mappedAnnotations.put(d.getClass(), d);
annotations.add(d);
} else {
annotations.add(a);
}
}