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