Example usage for com.fasterxml.jackson.databind.introspect AnnotatedWithParams getParameterAnnotations

List of usage examples for com.fasterxml.jackson.databind.introspect AnnotatedWithParams getParameterAnnotations

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind.introspect AnnotatedWithParams getParameterAnnotations.

Prototype

public final AnnotationMap getParameterAnnotations(int paramInt) 

Source Link

Usage

From source file:com.github.mrenou.jacksonatic.internal.AnnotatedClassLogger.java

private static void logParameters(StringBuilder sb, AnnotatedWithParams annotatedWithParams) {
    IntStream//ww  w  .  j av  a2s . c  om
            .range(0, annotatedWithParams.getParameterCount()).filter(
                    index -> hasAnnotation(annotatedWithParams.getParameterAnnotations(index)))
            .forEach(index -> sb
                    .append(" > p" + index + ": "
                            + annotationsItToStr(annotatedWithParams.getParameterAnnotations(index)))
                    .append(ln));
}

From source file:com.github.mrenou.jacksonatic.internal.AnnotatedClassLogger.java

private static boolean hasAnnotationOrParameterAnnotation(AnnotatedWithParams annotatedWithParams) {
    return hasAnnotation(annotatedWithParams.annotations()) || IntStream
            .range(0, annotatedWithParams.getParameterCount())
            .mapToObj(index -> annotatedWithParams.getParameterAnnotations(index)).reduce(false,
                    (acc, annotationMap) -> acc | hasAnnotation(annotationMap), (acc1, acc2) -> acc1 | acc2);

}