本文整理汇总了Java中com.fasterxml.jackson.databind.ser.BeanPropertyFilter类的典型用法代码示例。如果您正苦于以下问题:Java BeanPropertyFilter类的具体用法?Java BeanPropertyFilter怎么用?Java BeanPropertyFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BeanPropertyFilter类属于com.fasterxml.jackson.databind.ser包,在下文中一共展示了BeanPropertyFilter类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: acceptJsonFormatVisitor
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper paramJsonFormatVisitorWrapper, JavaType paramJavaType)
{
JsonObjectFormatVisitor localJsonObjectFormatVisitor1;
if (paramJsonFormatVisitorWrapper == null)
localJsonObjectFormatVisitor1 = null;
else
localJsonObjectFormatVisitor1 = paramJsonFormatVisitorWrapper.expectObjectFormat(paramJavaType);
JsonObjectFormatVisitor localJsonObjectFormatVisitor2 = localJsonObjectFormatVisitor1;
if (localJsonObjectFormatVisitor1 != null)
{
if (this._propertyFilterId != null)
{
BeanPropertyFilter localBeanPropertyFilter = findFilter(paramJsonFormatVisitorWrapper.getProvider());
for (int j = 0; j < this._props.length; j++)
localBeanPropertyFilter.depositSchemaProperty(this._props[j], localJsonObjectFormatVisitor2, paramJsonFormatVisitorWrapper.getProvider());
return;
}
for (int i = 0; i < this._props.length; i++)
this._props[i].depositSchemaProperty(localJsonObjectFormatVisitor2);
}
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:22,代码来源:BeanSerializerBase.java
示例2: getFilterProvider
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public static FilterProvider getFilterProvider(final String... fieldsToExclude) {
if (null == fieldsToExclude || fieldsToExclude.length == 0) {
// Use the 'serializeAllExcept' method so it is compatible with older versions of jackson
return new SimpleFilterProvider()
.addFilter(FILTER_FIELDS_BY_NAME, (BeanPropertyFilter) SimpleBeanPropertyFilter.serializeAllExcept());
}
return new SimpleFilterProvider()
.addFilter(FILTER_FIELDS_BY_NAME, (BeanPropertyFilter) SimpleBeanPropertyFilter.serializeAllExcept(fieldsToExclude));
}
开发者ID:gchq,项目名称:Gaffer,代码行数:11,代码来源:JSONSerialiser.java
示例3: findFilter
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
protected BeanPropertyFilter findFilter(SerializerProvider paramSerializerProvider)
{
Object localObject = this._propertyFilterId;
FilterProvider localFilterProvider = paramSerializerProvider.getFilterProvider();
if (localFilterProvider == null)
throw new JsonMappingException("Can not resolve BeanPropertyFilter with id '" + localObject + "'; no FilterProvider configured");
return localFilterProvider.findFilter(localObject);
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:9,代码来源:BeanSerializerBase.java
示例4: getSchema
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public JsonNode getSchema(SerializerProvider paramSerializerProvider, Type paramType)
{
ObjectNode localObjectNode1 = createSchemaNode("object", true);
JsonSerializableSchema localJsonSerializableSchema = (JsonSerializableSchema)this._handledType.getAnnotation(JsonSerializableSchema.class);
if (localJsonSerializableSchema != null)
{
String str = localJsonSerializableSchema.id();
if ((str != null) && (str.length() > 0))
localObjectNode1.put("id", str);
}
ObjectNode localObjectNode2 = localObjectNode1.objectNode();
BeanPropertyFilter localBeanPropertyFilter;
if (this._propertyFilterId != null)
localBeanPropertyFilter = findFilter(paramSerializerProvider);
else
localBeanPropertyFilter = null;
for (int i = 0; i < this._props.length; i++)
{
BeanPropertyWriter localBeanPropertyWriter = this._props[i];
if (localBeanPropertyFilter == null)
localBeanPropertyWriter.depositSchemaProperty(localObjectNode2, paramSerializerProvider);
else
localBeanPropertyFilter.depositSchemaProperty(localBeanPropertyWriter, localObjectNode2, paramSerializerProvider);
}
localObjectNode1.put("properties", localObjectNode2);
return localObjectNode1;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:28,代码来源:BeanSerializerBase.java
示例5: findFilter
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public BeanPropertyFilter findFilter(Object paramObject)
{
BeanPropertyFilter localBeanPropertyFilter1 = (BeanPropertyFilter)this._filtersById.get(paramObject);
Object localObject = localBeanPropertyFilter1;
if (localBeanPropertyFilter1 == null)
{
BeanPropertyFilter localBeanPropertyFilter2 = this._defaultFilter;
localObject = localBeanPropertyFilter2;
if ((localBeanPropertyFilter2 == null) && (this._cfgFailOnUnknownId))
throw new IllegalArgumentException("No filter configured with id '" + paramObject + "' (type " + paramObject.getClass().getName() + ")");
}
return localObject;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:14,代码来源:SimpleFilterProvider.java
示例6: serializeFieldsFiltered
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public void serializeFieldsFiltered(Object paramObject, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider)
{
BeanPropertyWriter[] arrayOfBeanPropertyWriter;
if ((this._filteredProps != null) && (paramSerializerProvider.getActiveView() != null))
arrayOfBeanPropertyWriter = this._filteredProps;
else
arrayOfBeanPropertyWriter = this._props;
BeanPropertyFilter localBeanPropertyFilter = findFilter(paramSerializerProvider);
if (localBeanPropertyFilter == null)
{
serializeFields(paramObject, paramJsonGenerator, paramSerializerProvider);
return;
}
for (int i = 0; ; i++)
try
{
int j = arrayOfBeanPropertyWriter.length;
if (i < j)
{
BeanPropertyWriter localBeanPropertyWriter = arrayOfBeanPropertyWriter[i];
if (localBeanPropertyWriter != null)
localBeanPropertyFilter.serializeAsField(paramObject, paramJsonGenerator, paramSerializerProvider, localBeanPropertyWriter);
}
else
{
if (this._anyGetterWriter != null)
this._anyGetterWriter.getAndSerialize(paramObject, paramJsonGenerator, paramSerializerProvider);
return;
}
}
catch (Exception localException)
{
String str2;
if (i == arrayOfBeanPropertyWriter.length)
str2 = "[anySetter]";
else
str2 = arrayOfBeanPropertyWriter[i].getName();
wrapAndThrow(paramSerializerProvider, localException, paramObject, str2);
return;
}
catch (StackOverflowError localStackOverflowError)
{
JsonMappingException localJsonMappingException = new JsonMappingException("Infinite recursion (StackOverflowError)", localStackOverflowError);
String str1;
if (i == arrayOfBeanPropertyWriter.length)
str1 = "[anySetter]";
else
str1 = arrayOfBeanPropertyWriter[i].getName();
localJsonMappingException.prependPath(new JsonMappingException.Reference(paramObject, str1));
throw localJsonMappingException;
}
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:53,代码来源:BeanSerializerBase.java
示例7: SimpleFilterProvider
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public SimpleFilterProvider(Map<String, BeanPropertyFilter> paramMap)
{
this._filtersById = paramMap;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:SimpleFilterProvider.java
示例8: addFilter
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public SimpleFilterProvider addFilter(String paramString, BeanPropertyFilter paramBeanPropertyFilter)
{
this._filtersById.put(paramString, paramBeanPropertyFilter);
return this;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:6,代码来源:SimpleFilterProvider.java
示例9: getDefaultFilter
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public BeanPropertyFilter getDefaultFilter()
{
return this._defaultFilter;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:SimpleFilterProvider.java
示例10: removeFilter
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public BeanPropertyFilter removeFilter(String paramString)
{
return (BeanPropertyFilter)this._filtersById.remove(paramString);
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:SimpleFilterProvider.java
示例11: setDefaultFilter
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
public SimpleFilterProvider setDefaultFilter(BeanPropertyFilter paramBeanPropertyFilter)
{
this._defaultFilter = paramBeanPropertyFilter;
return this;
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:6,代码来源:SimpleFilterProvider.java
示例12: findFilter
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
@Override
public BeanPropertyFilter findFilter(Object filterId) {
throw new UnsupportedOperationException("This deprecated method is not called by the latest version of Jackson.");
}
开发者ID:Russell-Allen,项目名称:jackson-morphed-result,代码行数:5,代码来源:FilteredResultProvider.java
示例13: findFilter
import com.fasterxml.jackson.databind.ser.BeanPropertyFilter; //导入依赖的package包/类
@Override
public BeanPropertyFilter findFilter(final Object filterId) {
throw new UnsupportedOperationException("Access to deprecated filters not supported");
}
开发者ID:icode,项目名称:ameba,代码行数:5,代码来源:JacksonObjectProvider.java
注:本文中的com.fasterxml.jackson.databind.ser.BeanPropertyFilter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论