本文整理了Java中com.fasterxml.jackson.databind.introspect.AnnotatedMember.addOrOverride()
方法的一些代码示例,展示了AnnotatedMember.addOrOverride()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnnotatedMember.addOrOverride()
方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.introspect.AnnotatedMember
类名称:AnnotatedMember
方法名:addOrOverride
[英]Method called to override an annotation, usually due to a mix-in annotation masking or overriding an annotation 'real' constructor has.
[中]方法来重写注释,通常是由于注释掩蔽或重写注释“real”构造函数中的混合。
代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind
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);
}
}
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
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);
}
}
}
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
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()]));
}
}
}
代码示例来源:origin: Nextdoor/bender
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()]));
}
}
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
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()]));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!