Example usage for com.fasterxml.jackson.databind.introspect AnnotatedClass getStaticMethods

List of usage examples for com.fasterxml.jackson.databind.introspect AnnotatedClass getStaticMethods

Introduction

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

Prototype

public List<AnnotatedMethod> getStaticMethods() 

Source Link

Usage

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

private static void logStaticFactoryAnnotations(AnnotatedClass annotatedClass, StringBuilder sb) {
    stream(annotatedClass.getStaticMethods())
            .filter(annotatedMethod -> hasAnnotationOrParameterAnnotation(annotatedMethod))
            .forEach(annotatedMethod -> {
                sb.append("> StaticFactory["
                        + methodSignature(annotatedMethod.getName(), annotatedMethod.getRawParameterTypes())
                        + "] : " + annotationsItToStr(annotatedMethod.annotations())).append(ln);
                logParameters(sb, annotatedMethod);
            });//from   w  w w  . j a v a2  s .  c o m
}

From source file:com.github.mrenou.jacksonatic.internal.annotations.ClassAnnotationDecorator.java

private void addStaticFactoryAnnotations(AnnotatedClass annotatedClass,
        ClassBuilderMapping classBuilderMapping) {
    AnnotatedMethod staticFactoryMember = annotatedClass.getStaticMethods().stream()
            .filter(method -> method.getMember().equals(classBuilderMapping.getStaticFactory())).findFirst()
            .get();/*www .j ava2 s  .  c  o m*/
    setAnnotationsOnMemberWithParams(classBuilderMapping.getAnnotations(),
            classBuilderMapping.getParametersMapping(), staticFactoryMember);
}