List of usage examples for com.fasterxml.jackson.databind.introspect AnnotatedClass getAnnotated
public Class<?> getAnnotated()
From source file:com.github.mrenou.jacksonatic.internal.AnnotatedClassLogger.java
private static void logClassAnnotations(AnnotatedClass annotatedClass, StringBuilder sb) { sb.append(("Class " + annotatedClass.getAnnotated().getName() + ": " + annotationsItToStr(annotatedClass.annotations()))).append(ln); }
From source file:com.github.mrenou.jacksonatic.internal.AnnotatedClassLogger.java
private static void logConstructorAnnotations(AnnotatedClass annotatedClass, StringBuilder sb) { stream(annotatedClass.getConstructors()) .filter(annotatedConstructor -> hasAnnotationOrParameterAnnotation(annotatedConstructor)) .forEach(annotatedConstructor -> { List<Class<?>> parameterTypes = IntStream.range(0, annotatedConstructor.getParameterCount()) .mapToObj(index -> annotatedConstructor.getRawParameterType(index)) .collect(Collectors.toList()); sb.append("> Constructor[" + methodSignature(annotatedClass.getAnnotated().getSimpleName(), parameterTypes) + "] : " + annotationsItToStr(annotatedConstructor.annotations())).append(ln); logParameters(sb, annotatedConstructor); });/*from ww w .j a v a 2s. c om*/ }
From source file:com.github.mrenou.jacksonatic.internal.introspection.AnnotatedClassConstructor.java
@SuppressWarnings("unchecked") private AnnotatedClass processAnnotatedClass(JacksonOperation processType, AnnotatedClass ac) { if (ac.getAnnotated().getName().startsWith("java.")) { return ac; }/*from w w w . j a va 2 s . com*/ Class<Object> annotated = (Class<Object>) ac.getAnnotated(); ClassesMapping serOrDeserClassesMapping = getSerOrDeserClassMapping(processType); ClassesMapping mergedClassesMapping = this.mergedClassesMappingByOperation.getTyped(processType); return Optional .ofNullable(mergedClassesMapping.getOpt(annotated) .orElseGet(() -> mergeAndPutInMergedClassesMapping(mergedClassesMapping, annotated, serOrDeserClassesMapping.getOpt(annotated), classesMappingByOperation.get(ANY).getOpt(annotated), getClassMappingFromSuperTypes(annotated, serOrDeserClassesMapping, mergedClassesMapping)))) .map(classMapping -> classAnnotationDecorator.decorate(ac, classMapping)).orElse(ac); }