com.fasterxml.jackson.databind.introspect.Annotated#hasAnnotation ( )源码实例Demo

下面列出了com.fasterxml.jackson.databind.introspect.Annotated#hasAnnotation ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: onedev   文件: HibernateAnnotationIntrospector.java
@SuppressWarnings("unchecked")
@Override
public Object findSerializer(Annotated am) {
	if (am.hasAnnotation(ManyToOne.class)) {
		return new ManyToOneSerializer((Class<AbstractEntity>) am.getRawType());
	} else {
		return super.findDeserializer(am);
	}
}
 
源代码2 项目: onedev   文件: HibernateAnnotationIntrospector.java
@Override
public Object findDeserializer(Annotated am) {
	if (am.hasAnnotation(ManyToOne.class)) {
		return new ManyToOneDeserializer(am.getRawType());
	} else {
		return super.findDeserializer(am);
	}
}
 
源代码3 项目: elepy   文件: CustomAnnotationIntrospector.java
private boolean isId(Annotated annotated) {
    return annotated.hasAnnotation(Id.class)
            || annotated.hasAnnotation(javax.persistence.Id.class)
            || annotated.hasAnnotation(Identifier.class)
            || annotated.getName().equals("id");

}
 
源代码4 项目: requery   文件: EntityAnnotationIntrospector.java
private PropertyName getMappedName(Annotated annotated) {
    if (annotated.hasAnnotation(Table.class)) {
        Table table = annotated.getAnnotation(Table.class);
        return new PropertyName(table.name());
    } if (annotated.hasAnnotation(View.class)) {
        View view = annotated.getAnnotation(View.class);
        return new PropertyName(view.name());
    } else if (annotated.hasAnnotation(Column.class)) {
        Column column = annotated.getAnnotation(Column.class);
        return new PropertyName(column.name());
    } else {
        return null;
    }
}
 
@Override
public Object findSerializer(Annotated am) {
  if (am.hasAnnotation(Obfuscate.class)) {
    return OBFUSCATE_SERIALIZER;
  } else {
    return null;
  }
}
 
源代码6 项目: Rosetta   文件: RosettaAnnotationIntrospector.java
@Override
public boolean hasCreatorAnnotation(Annotated a) {
  return a.hasAnnotation(RosettaCreator.class);
}