if (declaration != null) {
org.codehaus.enunciate.Facet facet = declaration.getAnnotation(org.codehaus.enunciate.Facet.class);
if (facet != null) {
bucket.add(new Facet(facet, declaration.getSimpleName()));
}
Facets facets = declaration.getAnnotation(Facets.class);
if (facets != null) {
for (org.codehaus.enunciate.Facet f : facets.value()) {
bucket.add(new Facet(f, declaration.getSimpleName()));
}
}
Collection<AnnotationMirror> annotationMirrors = declaration.getAnnotationMirrors();
for (AnnotationMirror annotationMirror : annotationMirrors) {
AnnotationType annotationType = annotationMirror.getAnnotationType();
if (annotationType != null) {
AnnotationTypeDeclaration annotationDeclaration = annotationType.getDeclaration();
facet = annotationDeclaration.getAnnotation(org.codehaus.enunciate.Facet.class);
if (facet != null) {
bucket.add(new Facet(facet, annotationDeclaration.getSimpleName()));
}
facets = annotationDeclaration.getAnnotation(Facets.class);
if (facets != null) {
for (org.codehaus.enunciate.Facet f : facets.value()) {
bucket.add(new Facet(f, annotationDeclaration.getSimpleName()));
}
}
}
}