Java PropertyName类代码示例(javapropertyname代码示例汇总)

本文整理汇总了Java中com.fasterxml.jackson.databind.PropertyName的典型用法代码示例。如果您正苦于以下问题:Java PropertyName类的具体用法?Java PropertyName怎么用?Java PropertyName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Java PropertyName类代码示例(javapropertyname代码示例汇总)

PropertyName类属于com.fasterxml.jackson.databind包,在下文中一共展示了PropertyName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: findNameForSerialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForSerialization(Annotated a) {
	if (!(a instanceof AnnotatedField) && !(a instanceof AnnotatedMethod)) {
		return super.findNameForSerialization(a);
	}

	IndexableProperty property = a.getAnnotation(IndexableProperty.class);
	if (property != null && !property.name().isEmpty()) {
		return new PropertyName(property.name());
	}

	IndexableComponent component = a.getAnnotation(IndexableComponent.class);
	if (component != null && !component.name().isEmpty()) {
		return new PropertyName(component.name());
	}

	IndexableProperties properties = a.getAnnotation(IndexableProperties.class);
	if (properties != null && !properties.name().isEmpty()) {
		return new PropertyName(properties.name());
	}

	return PropertyName.USE_DEFAULT;
} 
开发者ID:aureliano,项目名称:evt-bridge,代码行数:24,代码来源:ElasticSearchAnnotationIntrospector.java

示例2: findNameForDeserialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForDeserialization(Annotated a) {
	if (!(a instanceof AnnotatedField) && !(a instanceof AnnotatedMethod)) {
		return super.findNameForDeserialization(a);
	}

	IndexableProperty property = a.getAnnotation(IndexableProperty.class);
	if (property != null && !property.name().isEmpty()) {
		return new PropertyName(property.name());
	}

	IndexableComponent component = a.getAnnotation(IndexableComponent.class);
	if (component != null && !component.name().isEmpty()) {
		return new PropertyName(component.name());
	}

	IndexableProperties properties = a.getAnnotation(IndexableProperties.class);
	if (properties != null && !properties.name().isEmpty()) {
		return new PropertyName(properties.name());
	}

	return PropertyName.USE_DEFAULT;
} 
开发者ID:aureliano,项目名称:evt-bridge,代码行数:24,代码来源:ElasticSearchAnnotationIntrospector.java

示例3: getPropertyName

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
private PropertyName getPropertyName( Annotated annotated ) {

        Column column = annotated.getAnnotation( Column.class );
        if ( column != null && StringUtil.isNotEmpty(annotated.getName()) ) {
            String name = column.name();
            name = StringUtil.toUncamel( name );
            name = StringUtil.toCamel( name );
            return new PropertyName( name );
        }

        JsonProperty jsonProperty = annotated.getAnnotation( JsonProperty.class );
        if( jsonProperty != null ) {
            if( StringUtil.isNotEmpty(jsonProperty.value()) ) {
                return new PropertyName( jsonProperty.value() );
            } else {
                return PropertyName.USE_DEFAULT;
            }
        }

        return null;

    } 
开发者ID:NyBatis,项目名称:NyBatisCore,代码行数:23,代码来源:ColumnAnnotationInspector.java

示例4: findNameForDeserialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
public PropertyName findNameForDeserialization(Annotated paramAnnotated)
{
  String str;
  if ((paramAnnotated instanceof AnnotatedField))
    str = findDeserializationName((AnnotatedField)paramAnnotated);
  else if ((paramAnnotated instanceof AnnotatedMethod))
    str = findDeserializationName((AnnotatedMethod)paramAnnotated);
  else if ((paramAnnotated instanceof AnnotatedParameter))
    str = findDeserializationName((AnnotatedParameter)paramAnnotated);
  else
    str = null;
  if (str != null)
  {
    if (str.length() == 0)
      return PropertyName.USE_DEFAULT;
    return new PropertyName(str);
  }
  return null;
} 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:20,代码来源:JacksonAnnotationIntrospector.java

示例5: findNameForSerialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
public PropertyName findNameForSerialization(Annotated paramAnnotated)
{
  String str;
  if ((paramAnnotated instanceof AnnotatedField))
    str = findSerializationName((AnnotatedField)paramAnnotated);
  else if ((paramAnnotated instanceof AnnotatedMethod))
    str = findSerializationName((AnnotatedMethod)paramAnnotated);
  else
    str = null;
  if (str != null)
  {
    if (str.length() == 0)
      return PropertyName.USE_DEFAULT;
    return new PropertyName(str);
  }
  return null;
} 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:18,代码来源:JacksonAnnotationIntrospector.java

示例6: SettableBeanProperty

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
public SettableBeanProperty(String paramString, JavaType paramJavaType, PropertyName paramPropertyName, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, boolean paramBoolean)
{
  if ((paramString == null) || (paramString.length() == 0))
    this._propName = "";
  else
    this._propName = InternCache.instance.intern(paramString);
  this._type = paramJavaType;
  this._wrapperName = paramPropertyName;
  this._isRequired = paramBoolean;
  this._contextAnnotations = paramAnnotations;
  this._viewMatcher = null;
  this._nullProvider = null;
  if (paramTypeDeserializer != null)
    paramTypeDeserializer = paramTypeDeserializer.forProperty(this);
  this._valueTypeDeserializer = paramTypeDeserializer;
  this._valueDeserializer = MISSING_VALUE_DESERIALIZER;
} 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:18,代码来源:SettableBeanProperty.java

示例7: findNameForSerialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForSerialization(Annotated a) {
    if (!(a instanceof AnnotatedField) && !(a instanceof AnnotatedMethod)) {
        return super.findNameForSerialization(a);
    }

    IndexableProperty property = a.getAnnotation(IndexableProperty.class);
    if (property != null && !property.name().isEmpty()) {
        return new PropertyName(property.name());
    }

    IndexableComponent component = a.getAnnotation(IndexableComponent.class);
    if (component != null && !component.name().isEmpty()) {
        return new PropertyName(component.name());
    }

    IndexableProperties properties = a.getAnnotation(IndexableProperties.class);
    if (properties != null && !properties.name().isEmpty()) {
        return new PropertyName(properties.name());
    }

    return PropertyName.USE_DEFAULT;
} 
开发者ID:kzwang,项目名称:elasticsearch-osem,代码行数:24,代码来源:ElasticSearchOsemAnnotationIntrospector.java

示例8: findNameForDeserialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForDeserialization(Annotated a) {
    if (!(a instanceof AnnotatedField) && !(a instanceof AnnotatedMethod)) {
        return super.findNameForDeserialization(a);
    }

    IndexableProperty property = a.getAnnotation(IndexableProperty.class);
    if (property != null && !property.name().isEmpty()) {
        return new PropertyName(property.name());
    }

    IndexableComponent component = a.getAnnotation(IndexableComponent.class);
    if (component != null && !component.name().isEmpty()) {
        return new PropertyName(component.name());
    }

    IndexableProperties properties = a.getAnnotation(IndexableProperties.class);
    if (properties != null && !properties.name().isEmpty()) {
        return new PropertyName(properties.name());
    }

    return PropertyName.USE_DEFAULT;
} 
开发者ID:kzwang,项目名称:elasticsearch-osem,代码行数:24,代码来源:ElasticSearchOsemAnnotationIntrospector.java

示例9: findRootName

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findRootName(AnnotatedClass ac) {
    ApiModel model = ac.getAnnotation(ApiModel.class);
    if (model != null) {
        return new PropertyName(model.value());
    } else {
        return super.findRootName(ac);
    }
} 
开发者ID:kongchen,项目名称:swagger-maven-plugin,代码行数:10,代码来源:EnhancedSwaggerAnnotationIntrospector.java

示例10: findNameForDeserialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForDeserialization(Annotated annotated) {
    List<AnnotatedElement> namedCandidates = getNamedCandidates(annotated);
    return Stream.concat(
            namedCandidates.stream()
                    .map(member -> Optional.ofNullable(member.getAnnotation(GraphQLInputField.class))
                            .map(GraphQLInputField::name)),
            namedCandidates.stream()
                    .map(member -> Optional.ofNullable(member.getAnnotation(GraphQLQuery.class))
                            .map(GraphQLQuery::name)))
            .map(opt -> opt.filter(Utils::notEmpty))
            .reduce(Utils::or)
            .flatMap(optName -> optName.map(PropertyName::new))
            .orElse(super.findNameForDeserialization(annotated));
} 
开发者ID:leangen,项目名称:graphql-spqr,代码行数:16,代码来源:AnnotationIntrospector.java

示例11: findNameForSerialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForSerialization(Annotated a) {
  ApiResourceProperty apiName = a.getAnnotation(ApiResourceProperty.class);
  if (apiName != null && apiName.ignored() != AnnotationBoolean.TRUE) {
    return PropertyName.construct(apiName.name());
  }
  return null;
} 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:9,代码来源:ApiAnnotationIntrospector.java

示例12: findNameForDeserialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForDeserialization(Annotated a) {
  ApiResourceProperty apiName = a.getAnnotation(ApiResourceProperty.class);
  if (apiName != null && apiName.ignored() != AnnotationBoolean.TRUE) {
    return PropertyName.construct(apiName.name());
  }
  return null;
} 
开发者ID:cloudendpoints,项目名称:endpoints-java,代码行数:9,代码来源:ApiAnnotationIntrospector.java

示例13: findObjectIdInfo

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public ObjectIdInfo findObjectIdInfo(Annotated annotated) {
    Class<?> rawClass = annotated.getType().getRawClass();
    for (Type<?> type : model.getTypes()) {
        if (type.getClassType() == rawClass && type.getSingleKeyAttribute() != null) {
            Attribute<?, ?> attribute = type.getSingleKeyAttribute();
            String name = removePrefix(attribute.getPropertyName());
            if (useTableNames) {
                name = attribute.getName();
            }

            // if the name is overridden use that
            Class<?> superClass = rawClass.getSuperclass();
            while (superClass != Object.class && superClass != null) {
                try {
                    Field field = superClass.getDeclaredField(attribute.getPropertyName());
                    JsonProperty jsonProperty = field.getAnnotation(JsonProperty.class);
                    if (jsonProperty != null) {
                        name = jsonProperty.value();
                        break;
                    }
                } catch (NoSuchFieldException ignored) {
                }
                superClass = superClass.getSuperclass();
            }

            return new ObjectIdInfo(new PropertyName(name), rawClass,
                    ObjectIdGenerators.PropertyGenerator.class,
                    EntityStoreResolver.class);
        }
    }
    return super.findObjectIdInfo(annotated);
} 
开发者ID:requery,项目名称:requery,代码行数:34,代码来源:EntityAnnotationIntrospector.java

示例14: findNameForDeserialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForDeserialization(Annotated annotated) {
    if (useTableNames) {
        return getMappedName(annotated);
    } else {
        return super.findNameForDeserialization(annotated);
    }
} 
开发者ID:requery,项目名称:requery,代码行数:9,代码来源:EntityAnnotationIntrospector.java

示例15: findNameForSerialization

import com.fasterxml.jackson.databind.PropertyName; //导入依赖的package包/类
@Override
public PropertyName findNameForSerialization(Annotated annotated) {
    if (useTableNames) {
        return getMappedName(annotated);
    } else {
        return super.findNameForSerialization(annotated);
    }
} 
开发者ID:requery,项目名称:requery,代码行数:9,代码来源:EntityAnnotationIntrospector.java

本文标签属性:

示例:示例英文

代码:代码零九

java:javascript18岁

PropertyName:PropertyName

上一篇:杭州大叔在菜场卖鱼22年,突然火了,这给他的生活带来了什么影响?(街上扛着鱼卖靠啥挣钱)(杭州大叔卖鱼一年赚了多少钱)
下一篇:Python win32pipe.CreatePipe方法代码示例(pythonwin32pipe.createpipe方法的典型用法代码示例)

为您推荐