@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; }
private void collectStereotypesOnAnnotations(Set<Element> seen, Set<String> stereotypes, Element element) { for (AnnotationMirror annotation : this.typeHelper.getAllAnnotationMirrors(element)) { Element next = collectStereotypes(seen, stereotypes, element, annotation); if (next != null) { collectStereotypesOnAnnotations(seen, stereotypes, next); } } }
@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; }
private void collectStereotypesOnAnnotations(Set<Element> seen, Set<String> stereotypes, Element element) { for (AnnotationMirror annotation : this.typeHelper.getAllAnnotationMirrors(element)) { Element next = collectStereotypes(seen, stereotypes, element, annotation); if (next != null) { collectStereotypesOnAnnotations(seen, stereotypes, next); } } }