本文整理了Java中com.fasterxml.jackson.databind.introspect.AnnotatedField.getAnnotated()
方法的一些代码示例,展示了AnnotatedField.getAnnotated()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AnnotatedField.getAnnotated()
方法的具体详情如下:
包路径:com.fasterxml.jackson.databind.introspect.AnnotatedField
类名称:AnnotatedField
方法名:getAnnotated
暂无
代码示例来源:origin: redisson/redisson
/**
* Constructor used for JDK Serialization when reading persisted object
*/
protected FieldProperty(FieldProperty src)
{
super(src);
_annotated = src._annotated;
Field f = _annotated.getAnnotated();
if (f == null) {
throw new IllegalArgumentException("Missing field (broken JDK (de)serialization?)");
}
_field = f;
_skipNulls = src._skipNulls;
}
代码示例来源:origin: redisson/redisson
public FieldProperty(BeanPropertyDefinition propDef, JavaType type,
TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedField field)
{
super(propDef, type, typeDeser, contextAnnotations);
_annotated = field;
_field = field.getAnnotated();
_skipNulls = NullsConstantProvider.isSkipper(_nullProvider);
}
代码示例来源:origin: redisson/redisson
@Override
public boolean isFieldVisible(AnnotatedField f) {
return isFieldVisible(f.getAnnotated());
}
代码示例来源:origin: com.fasterxml.jackson.module/jackson-module-jaxb-annotations
/**
* Whether the specified field is invisible, per the JAXB visibility rules.
*
* @param f The field.
* @return Whether the field is invisible.
*/
private boolean isVisible(AnnotatedField f)
{
// TODO: use AnnotatedField's annotations directly
for (Annotation annotation : f.getAnnotated().getDeclaredAnnotations()) {
if (isJAXBAnnotation(annotation)) {
return true;
}
}
XmlAccessType accessType = XmlAccessType.PUBLIC_MEMBER;
XmlAccessorType at = findAnnotation(XmlAccessorType.class, f, true, true, true);
if (at != null) {
accessType = at.value();
}
if (accessType == XmlAccessType.FIELD) {
return true;
}
if (accessType == XmlAccessType.PUBLIC_MEMBER) {
return Modifier.isPublic(f.getAnnotated().getModifiers());
}
return false;
}
代码示例来源:origin: apache/servicecomb-java-chassis
protected Object initSetter(BeanPropertyDefinition propertyDefinition) throws Throwable {
if (propertyDefinition.hasSetter()) {
return LambdaMetafactoryUtils.createSetter(propertyDefinition.getSetter().getAnnotated());
}
if (propertyDefinition.hasField() && propertyDefinition.getField().isPublic()) {
return LambdaMetafactoryUtils.createSetter(propertyDefinition.getField().getAnnotated());
}
return null;
}
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
public FieldProperty(BeanPropertyDefinition propDef, JavaType type,
TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedField field)
{
super(propDef, type, typeDeser, contextAnnotations);
_annotated = field;
_field = field.getAnnotated();
}
代码示例来源:origin: apache/servicecomb-java-chassis
@SuppressWarnings("unchecked")
public static <T> T initGetter(BeanPropertyDefinition propertyDefinition) {
if (propertyDefinition.hasGetter()) {
return LambdaMetafactoryUtils.createGetter(propertyDefinition.getGetter().getAnnotated());
}
if (propertyDefinition.hasField() && propertyDefinition.getField().isPublic()) {
return (T) LambdaMetafactoryUtils.createGetter(propertyDefinition.getField().getAnnotated());
}
return null;
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
public FieldProperty(BeanPropertyDefinition propDef, JavaType type,
TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedField field)
{
super(propDef, type, typeDeser, contextAnnotations);
_annotated = field;
_field = field.getAnnotated();
}
代码示例来源:origin: com.fasterxml.jackson.core/com.springsource.com.fasterxml.jackson.core.jackson-databind
public FieldProperty(BeanPropertyDefinition propDef, JavaType type,
TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedField field)
{
super(propDef, type, typeDeser, contextAnnotations);
_annotated = field;
_field = field.getAnnotated();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
public FieldProperty(BeanPropertyDefinition propDef, JavaType type,
TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedField field)
{
super(propDef, type, typeDeser, contextAnnotations);
_annotated = field;
_field = field.getAnnotated();
}
代码示例来源:origin: Nextdoor/bender
public FieldProperty(BeanPropertyDefinition propDef, JavaType type,
TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedField field)
{
super(propDef, type, typeDeser, contextAnnotations);
_annotated = field;
_field = field.getAnnotated();
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
/**
* Constructor used for JDK Serialization when reading persisted object
*/
protected FieldProperty(FieldProperty src)
{
super(src);
_annotated = src._annotated;
Field f = _annotated.getAnnotated();
if (f == null) {
throw new IllegalArgumentException("Missing field (broken JDK (de)serialization?)");
}
_field = f;
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
/**
* Constructor used for JDK Serialization when reading persisted object
*/
protected FieldProperty(FieldProperty src)
{
super(src);
_annotated = src._annotated;
Field f = _annotated.getAnnotated();
if (f == null) {
throw new IllegalArgumentException("Missing field (broken JDK (de)serialization?)");
}
_field = f;
}
代码示例来源:origin: com.jwebmp.jackson.core/jackson-databind
public FieldProperty(BeanPropertyDefinition propDef, JavaType type,
TypeDeserializer typeDeser, Annotations contextAnnotations, AnnotatedField field)
{
super(propDef, type, typeDeser, contextAnnotations);
_annotated = field;
_field = field.getAnnotated();
_skipNulls = NullsConstantProvider.isSkipper(_nullProvider);
}
代码示例来源:origin: org.apache.brooklyn/brooklyn-core
@Override
public boolean isFieldVisible(AnnotatedField f) {
return isFieldVisible(f.getAnnotated());
}
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
@Override
public boolean isFieldVisible(AnnotatedField f) {
return isFieldVisible(f.getAnnotated());
}
代码示例来源:origin: io.springfox/springfox-bean-validators
private static Optional<Field> extractFieldFromPropertyDefinition(BeanPropertyDefinition propertyDefinition) {
if (propertyDefinition.getField() != null) {
return Optional.fromNullable(propertyDefinition.getField().getAnnotated());
}
return Optional.absent();
}
代码示例来源:origin: leangen/graphql-spqr
PropertyDescriptor fromField(AnnotatedField fld) {
Field field = fld.getAnnotated();
AnnotatedType fieldType = transform(ClassUtils.getFieldType(field, type), field, type);
return new PropertyDescriptor(type, field.getDeclaringClass(), field, fieldType, fld);
}
代码示例来源:origin: org.apache.servicecomb/foundation-protobuf
protected Setter initSetter(BeanPropertyDefinition propertyDefinition) throws Throwable {
if (propertyDefinition.hasSetter()) {
return LambdaMetafactoryUtils.createSetter(propertyDefinition.getSetter().getAnnotated());
}
if (propertyDefinition.hasField() && propertyDefinition.getField().isPublic()) {
return LambdaMetafactoryUtils.createSetter(propertyDefinition.getField().getAnnotated());
}
return null;
}
代码示例来源:origin: org.apache.servicecomb/foundation-protobuf
protected Getter initGetter(BeanPropertyDefinition propertyDefinition) throws Throwable {
if (propertyDefinition.hasGetter()) {
return LambdaMetafactoryUtils.createGetter(propertyDefinition.getGetter().getAnnotated());
}
if (propertyDefinition.hasField() && propertyDefinition.getField().isPublic()) {
return LambdaMetafactoryUtils.createGetter(propertyDefinition.getField().getAnnotated());
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!