Example usage for com.fasterxml.jackson.databind.introspect AnnotatedMember getAnnotation

List of usage examples for com.fasterxml.jackson.databind.introspect AnnotatedMember getAnnotation

Introduction

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

Prototype

public abstract <A extends Annotation> A getAnnotation(Class<A> paramClass);

Source Link

Usage

From source file:org.candlepin.swagger.JAXBAnnotationsHelper.java

/**
 * Puts definitions for XML attribute./*w w w . j a va  2  s . c om*/
 *
 * @param member   annotations provider
 * @param property property instance to be updated
 */
private static void applyAttribute(AnnotatedMember member, Property property) {
    final XmlAttribute attribute = member.getAnnotation(XmlAttribute.class);
    if (attribute != null) {
        final Xml xml = getXml(property);
        xml.setAttribute(true);
        setName(attribute.namespace(), attribute.name(), property);
    }
}