private List<AnnotationPath> getPathsByPrecedence(AnnotatedElementMetadata metadata) { List<AnnotationPath> paths = metadata.findAnnotationPaths(VISITOR); if (paths.size() == 0) { return null; } paths = sort(paths); return paths; }
private void visitCallbacks( AnnotatedElementMetadata metadata, final ScanContext context, final Set<Metadata> visited) { List<AnnotationPath> callbacks = metadata.findAnnotationPaths(VISIT); Handler<AnnotatedElementMetadata> handler = new Handler<AnnotatedElementMetadata>() { public void handle(AnnotatedElementMetadata t) { visit(t, context, visited); } }; for (AnnotationPath callbackPath : callbacks) { VisitCallback callback = getInstanceOfValueAttribute(callbackPath, VisitCallback.class, this.callbacks); callback.perform(handler, metadata); } }