private void _addOrOverrideAnnotations(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation[]> bundles = null; for (Annotation ann : anns) { // first: direct annotations if (_isAnnotationBundle(ann)) { if (bundles == null) { bundles = new LinkedList<Annotation[]>(); } bundles.add(ann.annotationType().getDeclaredAnnotations()); } else { // note: no filtering by jackson-annotations target.addOrOverride(ann); } } if (bundles != null) { // and then bundles, if any: important for precedence for (Annotation[] annotations : bundles) { _addOrOverrideAnnotations(target, annotations); } } } }
private void _addOrOverrideAnnotations(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation[]> bundles = null; for (Annotation ann : anns) { // first: direct annotations if (_isAnnotationBundle(ann)) { if (bundles == null) { bundles = new LinkedList<Annotation[]>(); } bundles.add(ann.annotationType().getDeclaredAnnotations()); } else { // note: no filtering by jackson-annotations target.addOrOverride(ann); } } if (bundles != null) { // and then bundles, if any: important for precedence for (Annotation[] annotations : bundles) { _addOrOverrideAnnotations(target, annotations); } } } }
private void _addAnnotationsIfNotPresent(AnnotationMap result, Annotation[] anns) { if (anns != null) { List<Annotation[]> bundles = null; for (Annotation ann : anns) { // first: direct annotations if (_isAnnotationBundle(ann)) { if (bundles == null) { bundles = new LinkedList<Annotation[]>(); } bundles.add(ann.annotationType().getDeclaredAnnotations()); } else { // note: we will NOT filter out non-Jackson anns any more result.addIfNotPresent(ann); } } if (bundles != null) { // and secondarily handle bundles, if any found: precedence important for (Annotation[] annotations : bundles) { _addAnnotationsIfNotPresent(result, annotations); } } } }
private void _addAnnotationsIfNotPresent(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation[]> bundles = null; for (Annotation ann : anns) { // first: direct annotations if (_isAnnotationBundle(ann)) { if (bundles == null) { bundles = new LinkedList<Annotation[]>(); } bundles.add(ann.annotationType().getDeclaredAnnotations()); } else { // note: we will NOT filter out non-Jackson anns any more target.addIfNotPresent(ann); } } if (bundles != null) { // and secondarily handle bundles, if any found: precedence important for (Annotation[] annotations : bundles) { _addAnnotationsIfNotPresent(target, annotations); } } } }
private void _addAnnotationsIfNotPresent(AnnotationMap result, Annotation[] anns) { if (anns != null) { List<Annotation[]> bundles = null; for (Annotation ann : anns) { // first: direct annotations if (_isAnnotationBundle(ann)) { if (bundles == null) { bundles = new LinkedList<Annotation[]>(); } bundles.add(ann.annotationType().getDeclaredAnnotations()); } else { // note: we will NOT filter out non-Jackson anns any more result.addIfNotPresent(ann); } } if (bundles != null) { // and secondarily handle bundles, if any found: precedence important for (Annotation[] annotations : bundles) { _addAnnotationsIfNotPresent(result, annotations); } } } }
private void _addAnnotationsIfNotPresent(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation[]> bundles = null; for (Annotation ann : anns) { // first: direct annotations if (_isAnnotationBundle(ann)) { if (bundles == null) { bundles = new LinkedList<Annotation[]>(); } bundles.add(ann.annotationType().getDeclaredAnnotations()); } else { // note: we will NOT filter out non-Jackson anns any more target.addIfNotPresent(ann); } } if (bundles != null) { // and secondarily handle bundles, if any found: precedence important for (Annotation[] annotations : bundles) { _addAnnotationsIfNotPresent(target, annotations); } } } }
private void _addOrOverrideAnnotations(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations boolean wasModified = target.addOrOverride(ann); if (wasModified && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and then bundles, if any: important for precedence _addOrOverrideAnnotations(target, fromBundles.toArray(new Annotation[fromBundles.size()])); } } }
private void _addOrOverrideAnnotations(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations boolean wasModified = target.addOrOverride(ann); if (wasModified && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and then bundles, if any: important for precedence _addOrOverrideAnnotations(target, fromBundles.toArray(new Annotation[fromBundles.size()])); } } }
private AnnotationMap _addAnnotationsIfNotPresent(AnnotationMap result, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations // note: we will NOT filter out non-Jackson anns any more boolean wasNotPresent = result.addIfNotPresent(ann); if (wasNotPresent && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and secondarily handle bundles, if any found: precedence important _addAnnotationsIfNotPresent(result, fromBundles.toArray(new Annotation[fromBundles.size()])); } } return result; }
private void _addAnnotationsIfNotPresent(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations boolean wasNotPresent = target.addIfNotPresent(ann); if (wasNotPresent && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and secondarily handle bundles, if any found: precedence important _addAnnotationsIfNotPresent(target, fromBundles.toArray(new Annotation[fromBundles.size()])); } } }
private void _addAnnotationsIfNotPresent(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations boolean wasNotPresent = target.addIfNotPresent(ann); if (wasNotPresent && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and secondarily handle bundles, if any found: precedence important _addAnnotationsIfNotPresent(target, fromBundles.toArray(new Annotation[fromBundles.size()])); } } }
private AnnotationMap _addAnnotationsIfNotPresent(AnnotationMap result, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations // note: we will NOT filter out non-Jackson anns any more boolean wasNotPresent = result.addIfNotPresent(ann); if (wasNotPresent && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and secondarily handle bundles, if any found: precedence important _addAnnotationsIfNotPresent(result, fromBundles.toArray(new Annotation[fromBundles.size()])); } } return result; }
private void _addAnnotationsIfNotPresent(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations boolean wasNotPresent = target.addIfNotPresent(ann); if (wasNotPresent && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and secondarily handle bundles, if any found: precedence important _addAnnotationsIfNotPresent(target, fromBundles.toArray(new Annotation[fromBundles.size()])); } } }
private void _addOrOverrideAnnotations(AnnotatedMember target, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations boolean wasModified = target.addOrOverride(ann); if (wasModified && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and then bundles, if any: important for precedence _addOrOverrideAnnotations(target, fromBundles.toArray(new Annotation[fromBundles.size()])); } } }
private AnnotationMap _addAnnotationsIfNotPresent(AnnotationMap result, Annotation[] anns) { if (anns != null) { List<Annotation> fromBundles = null; for (Annotation ann : anns) { // first: direct annotations // note: we will NOT filter out non-Jackson anns any more boolean wasNotPresent = result.addIfNotPresent(ann); if (wasNotPresent && _isAnnotationBundle(ann)) { fromBundles = _addFromBundle(ann, fromBundles); } } if (fromBundles != null) { // and secondarily handle bundles, if any found: precedence important _addAnnotationsIfNotPresent(result, fromBundles.toArray(new Annotation[fromBundles.size()])); } } return result; }