private void on()

in support/camel-k-apt/src/main/java/org/apache/camel/k/tooling/apt/CamelProcessor.java [117:124]


    private <T extends Annotation> void on(Element element, Class<T> annotationType, BiConsumer<TypeElement, T> consumer) {
        if (element instanceof TypeElement) {
            T annotation = element.getAnnotation(annotationType);
            if (annotation != null) {
                consumer.accept((TypeElement) element, annotation);
            }
        }
    }