use of javax.lang.model.element.ElementKind in project spring-framework by spring-projects.
the class StandardStereotypesProvider method getStereotypes.
@Override
public Set<String> getStereotypes(Element element) {
Set<String> stereotypes = new LinkedHashSet<>();
ElementKind kind = element.getKind();
if (kind != ElementKind.CLASS && kind != ElementKind.INTERFACE) {
return stereotypes;
}
for (AnnotationMirror annotation : this.typeHelper.getAllAnnotationMirrors(element)) {
String type = this.typeHelper.getType(annotation);
if (type.startsWith("javax.")) {
stereotypes.add(type);
}
}
return stereotypes;
}
Aggregations