Search in sources :

Example 1 with JsonManagedReference

use of com.fasterxml.jackson.annotation.JsonManagedReference in project ddf-common by dongfangding.

the class JacksonAnnotationIntrospector method findReferenceType.

@Override
public ReferenceProperty findReferenceType(AnnotatedMember member) {
    JsonManagedReference ref1 = _findAnnotation(member, JsonManagedReference.class);
    if (ref1 != null) {
        return ReferenceProperty.managed(ref1.value());
    }
    JsonBackReference ref2 = _findAnnotation(member, JsonBackReference.class);
    if (ref2 != null) {
        return ReferenceProperty.back(ref2.value());
    }
    return null;
}
Also used : JsonManagedReference(com.fasterxml.jackson.annotation.JsonManagedReference) JsonBackReference(com.fasterxml.jackson.annotation.JsonBackReference)

Aggregations

JsonBackReference (com.fasterxml.jackson.annotation.JsonBackReference)1 JsonManagedReference (com.fasterxml.jackson.annotation.JsonManagedReference)1