Example usage for com.fasterxml.jackson.databind.introspect AnnotatedMethod equals

List of usage examples for com.fasterxml.jackson.databind.introspect AnnotatedMethod equals

Introduction

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

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:com.arpnetworking.logback.jackson.StenoAnnotationIntrospector.java

/**
 * {@inheritDoc}//w  w w  . j a  v  a2  s .  c o m
 */
@Override
public boolean hasAsValueAnnotation(final AnnotatedMethod annotatedMethod) {
    // The @LogValue annotation if active takes precedence
    final AnnotatedClass annotatedClass = annotatedMethod.getContextClass();
    for (final AnnotatedMethod otherAnnotatedMethod : annotatedClass.memberMethods()) {
        final LogValue annotation = _findAnnotation(otherAnnotatedMethod, LogValue.class);
        if (annotation != null) {
            if (annotation.enabled()) {
                return otherAnnotatedMethod.equals(annotatedMethod);
            } else if (!annotation.fallback()) {
                return false;
            }
        }
    }

    // Otherwise use default logic (e.g respect @JsonValue)
    return super.hasAsValueAnnotation(annotatedMethod);
}