/** * Method that will add annotations from specified source method to target method, * but only if target does not yet have them. */ protected void _addMixUnders(Method src, AnnotatedMethod target) { _addAnnotationsIfNotPresent(target, src.getDeclaredAnnotations()); }
/** * Method that will add annotations from specified source method to target method, * but only if target does not yet have them. */ protected void _addMixUnders(Method src, AnnotatedMethod target) { _addAnnotationsIfNotPresent(target, src.getDeclaredAnnotations()); }
/** * Method that will add annotations from specified source method to target method, * but only if target does not yet have them. */ protected void _addMixUnders(Method src, AnnotatedMethod target) { _addAnnotationsIfNotPresent(target, src.getDeclaredAnnotations()); }
/** * Method that will add annotations from specified source method to target method, * but only if target does not yet have them. */ protected void _addMixUnders(Method src, AnnotatedMethod target) { _addAnnotationsIfNotPresent(target, src.getDeclaredAnnotations()); }
/** * Method that will add annotations from specified source method to target method, * but only if target does not yet have them. */ protected void _addMixUnders(Method src, AnnotatedMethod target) { _addAnnotationsIfNotPresent(target, src.getDeclaredAnnotations()); }
protected AnnotationMap _collectRelevantAnnotations(Annotation[] anns) { AnnotationMap annMap = new AnnotationMap(); _addAnnotationsIfNotPresent(annMap, anns); return annMap; }
protected void _addClassMixIns(AnnotationMap annotations, Class<?> toMask, Class<?> mixin) { if (mixin == null) { return; } // Ok, first: annotations from mix-in class itself: _addAnnotationsIfNotPresent(annotations, mixin.getDeclaredAnnotations()); /* And then from its supertypes, if any. But note that we will * only consider super-types up until reaching the masked * class (if found); this because often mix-in class * is a sub-class (for convenience reasons). And if so, we * absolutely must NOT include super types of masked class, * as that would inverse precedence of annotations. */ for (Class<?> parent : ClassUtil.findSuperTypes(mixin, toMask)) { _addAnnotationsIfNotPresent(annotations, parent.getDeclaredAnnotations()); } }
protected void _addClassMixIns(AnnotationMap annotations, Class<?> toMask, Class<?> mixin) { if (mixin == null) { return; } // Ok, first: annotations from mix-in class itself: _addAnnotationsIfNotPresent(annotations, mixin.getDeclaredAnnotations()); /* And then from its supertypes, if any. But note that we will * only consider super-types up until reaching the masked * class (if found); this because often mix-in class * is a sub-class (for convenience reasons). And if so, we * absolutely must NOT include super types of masked class, * as that would inverse precedence of annotations. */ for (Class<?> parent : ClassUtil.findSuperTypes(mixin, toMask)) { _addAnnotationsIfNotPresent(annotations, parent.getDeclaredAnnotations()); } }
protected AnnotationMap _collectRelevantAnnotations(Annotation[] anns) { AnnotationMap annMap = new AnnotationMap(); _addAnnotationsIfNotPresent(annMap, anns); return annMap; }
protected AnnotationMap _collectRelevantAnnotations(Annotation[] anns) { return _addAnnotationsIfNotPresent(new AnnotationMap(), anns); }
protected void _addClassMixIns(AnnotationMap annotations, Class<?> toMask, Class<?> mixin) { if (mixin == null) { return; } // Ok, first: annotations from mix-in class itself: _addAnnotationsIfNotPresent(annotations, mixin.getDeclaredAnnotations()); /* And then from its supertypes, if any. But note that we will * only consider super-types up until reaching the masked * class (if found); this because often mix-in class * is a sub-class (for convenience reasons). And if so, we * absolutely must NOT include super types of masked class, * as that would inverse precedence of annotations. */ for (Class<?> parent : ClassUtil.findSuperTypes(mixin, toMask)) { _addAnnotationsIfNotPresent(annotations, parent.getDeclaredAnnotations()); } }
protected void _addClassMixIns(AnnotationMap annotations, Class<?> toMask, Class<?> mixin) { if (mixin == null) { return; } // Ok, first: annotations from mix-in class itself: _addAnnotationsIfNotPresent(annotations, mixin.getDeclaredAnnotations()); /* And then from its supertypes, if any. But note that we will * only consider super-types up until reaching the masked * class (if found); this because often mix-in class * is a sub-class (for convenience reasons). And if so, we * absolutely must NOT include super types of masked class, * as that would inverse precedence of annotations. */ for (Class<?> parent : ClassUtil.findSuperTypes(mixin, toMask)) { _addAnnotationsIfNotPresent(annotations, parent.getDeclaredAnnotations()); } }
protected AnnotationMap _collectRelevantAnnotations(Annotation[] anns) { return _addAnnotationsIfNotPresent(new AnnotationMap(), anns); }
protected AnnotationMap _collectRelevantAnnotations(Annotation[] anns) { return _addAnnotationsIfNotPresent(new AnnotationMap(), anns); }
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 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 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 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; }