private static Collection<Annotation> getMemberTypeAnnotations(Declaration decl)
{
Collection<Annotation> annotations = new ArrayList<Annotation>();
for (AnnotationMirror am : decl.getAnnotationMirrors())
{
AnnotationType at = am.getAnnotationType();
try
{
if (at.getContainingType() == null)
continue;
String containingClassName = at.getContainingType()
.getDeclaration().getQualifiedName();
if (containingClassName.equals(AnnotationMemberTypes.class
.getName()))
{
String memberTypeName = at.getDeclaration().getSimpleName();
Class clazz = Class.forName(containingClassName + "$"
+ memberTypeName);
Annotation a = decl.getAnnotation(clazz);
if (null != a)
{