private AnnotationMap _mergeAnnotations(int index, Linked<? extends AnnotatedMember>... nodes) { AnnotationMap ann = _getAllAnnotations(nodes[index]); while (++index < nodes.length) { if (nodes[index] != null) { return AnnotationMap.merge(ann, _mergeAnnotations(index, nodes)); } } return ann; }
@Override public BasicBeanDescription forDirectClassAnnotations(MapperConfig<?> config, JavaType type, MixInResolver r) { BasicBeanDescription desc = _findStdTypeDesc(type); if (desc == null) { desc = BasicBeanDescription.forOtherUse(config, type, _resolveAnnotatedWithoutSuperTypes(config, type, r)); } return desc; }
public AnnotatedMethod build() { if (method == null) { return null; } // 12-Apr-2017, tatu: Note that parameter annotations are NOT collected -- we could // collect them if that'd make sense but... return new AnnotatedMethod(typeContext, method, annotations.asAnnotationMap(), null); } }
@Override public boolean isCreatorVisible(AnnotatedMember m) { return isCreatorVisible(m.getMember()); }
@Override public boolean isIsGetterVisible(AnnotatedMethod m) { return isIsGetterVisible(m.getAnnotated()); }
@Override public boolean isSetterVisible(AnnotatedMethod m) { return isSetterVisible(m.getAnnotated()); }
@Override public boolean isGetterVisible(AnnotatedMethod m) { return isGetterVisible(m.getAnnotated()); }
@Override public boolean isFieldVisible(AnnotatedField f) { return isFieldVisible(f.getAnnotated()); }
@Override public VisibilityChecker<?> findAutoDetectVisibility(AnnotatedClass ac, VisibilityChecker<?> checker) { JsonAutoDetect ann = _findAnnotation(ac, JsonAutoDetect.class); return (ann == null) ? checker : checker.with(ann); }
public final AnnotatedParameter getParameter(int index) { return new AnnotatedParameter(this, getParameterType(index), _typeContext, getParameterAnnotations(index), index); }
protected BasicBeanDescription _findStdJdkCollectionDesc(MapperConfig<?> cfg, JavaType type) { if (_isStdJDKCollection(type)) { return BasicBeanDescription.forOtherUse(cfg, type, _resolveAnnotatedClass(cfg, type, cfg)); } return null; }
Object writeReplace() { return new AnnotatedMethod(new Serialization(_method)); }
Object writeReplace() { return new AnnotatedField(new Serialization(_field)); }
Object writeReplace() { return new AnnotatedConstructor(new Serialization(_constructor)); }
@Override public JavaType getType() { return _typeContext.resolveType(getRawType()); }
public AnnotatedField build() { return new AnnotatedField(typeContext, field, annotations.asAnnotationMap()); } }
public PropertyName explicitParamName(int i) { BeanPropertyDefinition propDef = _params[i].propDef; if (propDef != null) { if (propDef.isExplicitlyNamed()) { return propDef.getFullName(); } } return null; }
/** * @since 2.6 */ public BeanPropertyDefinition findProperty(PropertyName name) { for (BeanPropertyDefinition prop : _properties()) { if (prop.hasName(name)) { return prop; } } return null; }
private AnnotationMap[] collectAnnotations(Annotation[][] mainAnns, Annotation[][] mixinAnns) { final int count = mainAnns.length; AnnotationMap[] result = new AnnotationMap[count]; for (int i = 0; i < count; ++i) { AnnotationCollector c = collectAnnotations(AnnotationCollector.emptyCollector(), mainAnns[i]); if (mixinAnns != null) { c = collectAnnotations(c, mixinAnns[i]); } result[i] = c.asAnnotationMap(); } return result; }