public class SerializerBuilder extends BeanTraverseBuilder
psb| Constructor and Description |
|---|
SerializerBuilder()
Constructor, default settings.
|
SerializerBuilder(PropertyStore ps)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SerializerBuilder |
add(Map<String,Object> properties)
Adds multiple configuration properties on this object.
|
SerializerBuilder |
addBeanTypes()
Configuration property: Add
|
SerializerBuilder |
addBeanTypes(boolean value)
Configuration property: Add
|
SerializerBuilder |
addRootType()
Configuration property: Add type attribute to root nodes.
|
SerializerBuilder |
addRootType(boolean value)
Configuration property: Add type attribute to root nodes.
|
SerializerBuilder |
addTo(String name,
Object value)
Adds a value to a SET or LIST property.
|
SerializerBuilder |
addTo(String name,
String key,
Object value)
Adds or overwrites a value to a SET, LIST, or MAP property.
|
SerializerBuilder |
apply(PropertyStore copyFrom)
Copies the settings from the specified property store into this builder.
|
SerializerBuilder |
applyAnnotations(AnnotationList al,
VarResolverSession vrs)
Applies a set of annotations to this property store.
|
SerializerBuilder |
applyAnnotations(Class<?> fromClass)
Applies any of the various
|
SerializerBuilder |
applyAnnotations(Method fromMethod)
Applies any of the various
|
SerializerBuilder |
beanClassVisibility(Visibility value)
Configuration property: Minimum bean class visibility.
|
SerializerBuilder |
beanConstructorVisibility(Visibility value)
Configuration property: Minimum bean constructor visibility.
|
SerializerBuilder |
beanDictionary(Class<?>... values)
Deprecated.
|
SerializerBuilder |
beanDictionary(Object... values)
Deprecated.
|
SerializerBuilder |
beanDictionaryRemove(Class<?>... values)
Deprecated.
|
SerializerBuilder |
beanDictionaryRemove(Object... values)
Deprecated.
|
SerializerBuilder |
beanDictionaryReplace(Class<?>... values)
Deprecated.
|
SerializerBuilder |
beanDictionaryReplace(Object... values)
Deprecated.
|
SerializerBuilder |
beanFieldVisibility(Visibility value)
Configuration property: Minimum bean field visibility.
|
SerializerBuilder |
beanFilters(Class<?>... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanFilters(Object... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanFiltersRemove(Class<?>... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanFiltersRemove(Object... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanFiltersReplace(Class<?>... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanFiltersReplace(Object... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanMapPutReturnsOldValue()
Configuration property: BeanMap.put() returns old property value.
|
SerializerBuilder |
beanMapPutReturnsOldValue(boolean value)
Configuration property: BeanMap.put() returns old property value.
|
SerializerBuilder |
beanMethodVisibility(Visibility value)
Configuration property: Minimum bean method visibility.
|
SerializerBuilder |
beansRequireDefaultConstructor()
Configuration property: Beans require no-arg constructors.
|
SerializerBuilder |
beansRequireDefaultConstructor(boolean value)
Configuration property: Beans require no-arg constructors.
|
SerializerBuilder |
beansRequireSerializable()
Configuration property: Beans require Serializable interface.
|
SerializerBuilder |
beansRequireSerializable(boolean value)
Configuration property: Beans require Serializable interface.
|
SerializerBuilder |
beansRequireSettersForGetters()
Configuration property: Beans require setters for getters.
|
SerializerBuilder |
beansRequireSettersForGetters(boolean value)
Configuration property: Beans require setters for getters.
|
SerializerBuilder |
beansRequireSomeProperties(boolean value)
Configuration property: Beans require at least one property.
|
SerializerBuilder |
beanTypePropertyName(String value)
Configuration property: Bean type property name.
|
SerializerBuilder |
bpi(Class<?> beanClass,
String value)
Configuration property: Bean property includes.
|
SerializerBuilder |
bpi(Map<String,String> values)
Configuration property: Bean property includes.
|
SerializerBuilder |
bpi(String beanClassName,
String value)
Configuration property: Bean property includes.
|
SerializerBuilder |
bpro(Class<?> beanClass,
String value)
Configuration property: Read-only bean properties.
|
SerializerBuilder |
bpro(Map<String,String> values)
Configuration property: Read-only bean properties.
|
SerializerBuilder |
bpro(String beanClassName,
String value)
Configuration property: Read-only bean properties.
|
SerializerBuilder |
bpwo(Class<?> beanClass,
String properties)
Configuration property: Write-only bean properties.
|
SerializerBuilder |
bpwo(Map<String,String> values)
Configuration property: Write-only bean properties.
|
SerializerBuilder |
bpwo(String beanClassName,
String value)
Configuration property: Write-only bean properties.
|
SerializerBuilder |
bpx(Class<?> beanClass,
String properties)
Configuration property: Bean property excludes.
|
SerializerBuilder |
bpx(Map<String,String> values)
Configuration property: Bean property excludes.
|
SerializerBuilder |
bpx(String beanClassName,
String value)
Configuration property: Bean property excludes.
|
Serializer |
build()
Build the object.
|
SerializerBuilder |
debug()
Configuration property: Debug mode.
|
SerializerBuilder |
detectRecursions()
Configuration property: Automatically detect POJO recursions.
|
SerializerBuilder |
detectRecursions(boolean value)
Configuration property: Automatically detect POJO recursions.
|
SerializerBuilder |
dictionary(Class<?>... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
dictionary(Object... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
dictionaryRemove(Class<?>... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
dictionaryRemove(Object... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
dictionaryReplace(Class<?>... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
dictionaryReplace(Object... values)
Configuration property: Bean dictionary.
|
<T> SerializerBuilder |
example(Class<T> c,
T o)
Configuration property: POJO example.
|
<T> SerializerBuilder |
exampleJson(Class<T> c,
String value)
Configuration property: POJO example.
|
SerializerBuilder |
ignoreInvocationExceptionsOnGetters()
Configuration property: Ignore invocation errors on getters.
|
SerializerBuilder |
ignoreInvocationExceptionsOnGetters(boolean value)
Configuration property: Ignore invocation errors on getters.
|
SerializerBuilder |
ignoreInvocationExceptionsOnSetters()
Configuration property: Ignore invocation errors on setters.
|
SerializerBuilder |
ignoreInvocationExceptionsOnSetters(boolean value)
Configuration property: Ignore invocation errors on setters.
|
SerializerBuilder |
ignorePropertiesWithoutSetters(boolean value)
Configuration property: Ignore properties without setters.
|
SerializerBuilder |
ignoreRecursions()
Configuration property: Ignore recursion errors.
|
SerializerBuilder |
ignoreRecursions(boolean value)
Configuration property: Ignore recursion errors.
|
SerializerBuilder |
ignoreUnknownBeanProperties()
Configuration property: Ignore unknown properties.
|
SerializerBuilder |
ignoreUnknownBeanProperties(boolean value)
Configuration property: Ignore unknown properties.
|
SerializerBuilder |
ignoreUnknownNullBeanProperties(boolean value)
Configuration property: Ignore unknown properties with null values.
|
SerializerBuilder |
implClass(Class<?> interfaceClass,
Class<?> implClass)
Configuration property: Implementation classes.
|
SerializerBuilder |
implClasses(Map<String,Class<?>> values)
Configuration property: Implementation classes.
|
SerializerBuilder |
initialDepth(int value)
Configuration property: Initial depth.
|
SerializerBuilder |
listener(Class<? extends SerializerListener> value)
Configuration property: Serializer listener.
|
SerializerBuilder |
locale(Locale value)
Configuration property: Locale.
|
SerializerBuilder |
maxDepth(int value)
Configuration property: Max traversal depth.
|
SerializerBuilder |
mediaType(MediaType value)
Configuration property: Media type.
|
SerializerBuilder |
notBeanClasses(Class<?>... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanClasses(Object... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanClassesRemove(Class<?>... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanClassesRemove(Object... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanClassesReplace(Class<?>... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanClassesReplace(Object... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanPackages(Object... values)
Configuration property: Bean package exclusions.
|
SerializerBuilder |
notBeanPackages(String... values)
Configuration property: Bean package exclusions.
|
SerializerBuilder |
notBeanPackagesRemove(Object... values)
Configuration property: Bean package exclusions.
|
SerializerBuilder |
notBeanPackagesRemove(String... values)
Configuration property: Bean package exclusions.
|
SerializerBuilder |
notBeanPackagesReplace(Object... values)
Configuration property: Bean package exclusions.
|
SerializerBuilder |
notBeanPackagesReplace(String... values)
Configuration property: Bean package exclusions.
|
SerializerBuilder |
pojoSwaps(Class<?>... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
pojoSwaps(Object... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
pojoSwapsRemove(Class<?>... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
pojoSwapsRemove(Object... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
pojoSwapsReplace(Class<?>... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
pojoSwapsReplace(Object... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
removeFrom(String name,
Object value)
Removes a value from a SET, LIST, or MAP property.
|
SerializerBuilder |
set(Map<String,Object> properties)
Sets multiple configuration properties on this object.
|
SerializerBuilder |
set(String name,
Object value)
Sets a configuration property on this object.
|
SerializerBuilder |
sortCollections()
Configuration property: Sort arrays and collections alphabetically.
|
SerializerBuilder |
sortCollections(boolean value)
Configuration property: Sort arrays and collections alphabetically.
|
SerializerBuilder |
sortMaps()
Configuration property: Sort maps alphabetically.
|
SerializerBuilder |
sortMaps(boolean value)
Configuration property: Sort maps alphabetically.
|
SerializerBuilder |
sortProperties()
Configuration property: Sort bean properties.
|
SerializerBuilder |
sortProperties(boolean value)
Configuration property: Sort bean properties.
|
SerializerBuilder |
timeZone(TimeZone value)
Configuration property: TimeZone.
|
SerializerBuilder |
trimEmptyCollections()
Configuration property: Trim empty lists and arrays.
|
SerializerBuilder |
trimEmptyCollections(boolean value)
Configuration property: Trim empty lists and arrays.
|
SerializerBuilder |
trimEmptyMaps()
Configuration property: Trim empty maps.
|
SerializerBuilder |
trimEmptyMaps(boolean value)
Configuration property: Trim empty maps.
|
SerializerBuilder |
trimNullProperties(boolean value)
Configuration property: Trim null bean property values.
|
SerializerBuilder |
trimStrings()
Configuration property: Trim strings.
|
SerializerBuilder |
trimStrings(boolean value)
Configuration property: Trim strings.
|
SerializerBuilder |
uriContext(String value)
Configuration property: URI context bean.
|
SerializerBuilder |
uriContext(UriContext value)
Configuration property: URI context bean.
|
SerializerBuilder |
uriRelativity(String value)
Configuration property: URI relativity.
|
SerializerBuilder |
uriRelativity(UriRelativity value)
Configuration property: URI relativity.
|
SerializerBuilder |
uriResolution(String value)
Configuration property: URI resolution.
|
SerializerBuilder |
uriResolution(UriResolution value)
Configuration property: URI resolution.
|
SerializerBuilder |
useEnumNames()
Configuration property: Use enum names.
|
SerializerBuilder |
useEnumNames(boolean value)
Configuration property: Use enum names.
|
SerializerBuilder |
useInterfaceProxies(boolean value)
Configuration property: Use interface proxies.
|
SerializerBuilder |
useJavaBeanIntrospector()
Configuration property: Use Java Introspector.
|
SerializerBuilder |
useJavaBeanIntrospector(boolean value)
Configuration property: Use Java Introspector.
|
debug, examples, excludeProperties, excludeProperties, excludeProperties, fluentSetters, fluentSetters, includeProperties, includeProperties, includeProperties, propertyNamerbuild, getPropertyStore, getPropertyStoreBuilder, peek, peekpublic SerializerBuilder()
public SerializerBuilder(PropertyStore ps)
ps - The initial configuration settings for this builder.public SerializerBuilder addBeanTypes(boolean value)
If
value - The new value for this property.
public SerializerBuilder addBeanTypes()
Shortcut for calling addBeanTypes(.
public SerializerBuilder addRootType(boolean value)
When disabled, it is assumed that the parser knows the exact Java POJO type being parsed, and therefore top-level type information that might normally be included to determine the data type will not be serialized.
value - The new value for this property.
public SerializerBuilder addRootType()
Shortcut for calling addRootType(.
public SerializerBuilder listener(Class<? extends SerializerListener> value)
Class used to listen for errors and warnings that occur during serialization.
value - The new value for this property.public SerializerBuilder sortCollections(boolean value)
Copies and sorts the contents of arrays and collections before serializing them.
value - The new value for this property.
public SerializerBuilder sortCollections()
Shortcut for calling sortCollections(.
public SerializerBuilder sortMaps(boolean value)
Copies and sorts the contents of maps before serializing them.
value - The new value for this property.
public SerializerBuilder sortMaps()
Shortcut for calling sortMaps(.
public SerializerBuilder trimEmptyCollections(boolean value)
If
value - The new value for this property.
public SerializerBuilder trimEmptyCollections()
Shortcut for calling trimEmptyCollections(.
public SerializerBuilder trimEmptyMaps(boolean value)
If
value - The new value for this property.
public SerializerBuilder trimEmptyMaps()
Shortcut for calling trimEmptyMaps(.
public SerializerBuilder trimNullProperties(boolean value)
If
value - The new value for this property.
public SerializerBuilder trimStrings(boolean value)
If String.trim() before being serialized.
value - The new value for this property.
public SerializerBuilder trimStrings()
Shortcut for calling trimStrings(.
public SerializerBuilder uriContext(UriContext value)
Bean used for resolution of URIs to absolute or root-relative form.
value - The new value for this property.public SerializerBuilder uriContext(String value)
Same as uriContext(UriContext) but allows you to pass in a JSON string.
WriterSerializer s = JsonSerializer
.
value - The new value for this property.public SerializerBuilder uriRelativity(UriRelativity value)
Defines what relative URIs are relative to when serializing URI/URL objects.
value - The new value for this property.
UriRelativity.RESOURCEpublic SerializerBuilder uriRelativity(String value)
Same as uriRelativity(UriRelativity) but allows you to pass in a string.
WriterSerializer s = JsonSerializer
.
value - The new value for this property.
UriRelativity.RESOURCEpublic SerializerBuilder uriResolution(UriResolution value)
Defines the resolution level for URIs when serializing URI/URL objects.
value - The new value for this property.
UriResolution.NONEpublic SerializerBuilder uriResolution(String value)
Same as uriResolution(UriResolution) but allows you to pass in a string.
WriterSerializer s = JsonSerializer
.
value - The new value for this property.
UriResolution.NONEpublic SerializerBuilder detectRecursions(boolean value)
BeanTraverseBuilderSpecifies that recursions should be checked for during traversal.
detectRecursions in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder detectRecursions()
BeanTraverseBuilder
Shortcut for calling detectRecursions(.
detectRecursions in class BeanTraverseBuilderpublic SerializerBuilder ignoreRecursions(boolean value)
BeanTraverseBuilder
If
ignoreRecursions in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder ignoreRecursions()
BeanTraverseBuilder
Shortcut for calling ignoreRecursions(.
ignoreRecursions in class BeanTraverseBuilderpublic SerializerBuilder initialDepth(int value)
BeanTraverseBuilderThe initial indentation level at the root.
initialDepth in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder maxDepth(int value)
BeanTraverseBuilder
Abort traversal if specified depth is reached in the POJO tree.
If this depth is exceeded, an exception is thrown.
This prevents stack overflows from occurring when trying to traverse models with recursive references.
maxDepth in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder beanClassVisibility(Visibility value)
BeanContextBuilderClasses are not considered beans unless they meet the minimum visibility requirements.
For example, if the visibility is
beanClassVisibility in class BeanTraverseBuildervalue - The new value for this property.
Visibility.PUBLIC.public SerializerBuilder beanConstructorVisibility(Visibility value)
BeanContextBuilderOnly look for constructors with the specified minimum visibility.
beanConstructorVisibility in class BeanTraverseBuildervalue - The new value for this property.
Visibility.PUBLIC.@Deprecated public SerializerBuilder beanDictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but takes in an array of classes.
beanDictionary in class BeanTraverseBuildervalues - The values to add to this property.@Deprecated public SerializerBuilder beanDictionary(Object... values)
BeanContextBuilderAdds to the list of classes that make up the bean dictionary in this bean context.
beanDictionary in class BeanTraverseBuildervalues - The values to add to this property.@Deprecated public SerializerBuilder beanDictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but replaces the existing value.
beanDictionaryReplace in class BeanTraverseBuildervalues - The new values for this property.@Deprecated public SerializerBuilder beanDictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but replaces the existing value.
beanDictionaryReplace in class BeanTraverseBuildervalues - The new values for this property.@Deprecated public SerializerBuilder beanDictionaryRemove(Class<?>... values)
BeanContextBuilderRemoves from the list of classes that make up the bean dictionary in this bean context.
beanDictionaryRemove in class BeanTraverseBuildervalues - The values to remove from this property.@Deprecated public SerializerBuilder beanDictionaryRemove(Object... values)
BeanContextBuilderRemoves from the list of classes that make up the bean dictionary in this bean context.
beanDictionaryRemove in class BeanTraverseBuildervalues - The values to remove from this property.public SerializerBuilder beanFieldVisibility(Visibility value)
BeanContextBuilderOnly look for bean fields with the specified minimum visibility.
beanFieldVisibility in class BeanTraverseBuildervalue - The new value for this property.
Visibility.PUBLIC.public SerializerBuilder beanFilters(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...) but takes in an array of classes.
beanFilters in class BeanTraverseBuildervalues - The values to add to this property.public SerializerBuilder beanFilters(Object... values)
BeanContextBuilder
This is a programmatic equivalent to the @Bean annotation.
It's useful when you want to use the Bean annotation functionality, but you don't have the ability to alter
the bean classes.
beanFilters in class BeanTraverseBuildervalues - The values to add to this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public SerializerBuilder beanFiltersReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...) but replaces the existing values.
beanFiltersReplace in class BeanTraverseBuildervalues - The new values for this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public SerializerBuilder beanFiltersReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...) but replaces the existing values.
beanFiltersReplace in class BeanTraverseBuildervalues - The new values for this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public SerializerBuilder beanFiltersRemove(Class<?>... values)
BeanContextBuilderRemoves from the list of classes that make up the bean filters in this bean context.
beanFiltersRemove in class BeanTraverseBuildervalues - The values to remove from this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public SerializerBuilder beanFiltersRemove(Object... values)
BeanContextBuilderRemoves from the list of classes that make up the bean filters in this bean context.
beanFiltersRemove in class BeanTraverseBuildervalues - The values to remove from this property.
@Bean(typeName).
BeanDictionaryList containing a collection of bean classes with type name annotations.
BeanDictionaryMap containing a mapping of type names to classes without type name annotations.
public SerializerBuilder beanMapPutReturnsOldValue(boolean value)
BeanContextBuilder
If BeanMap.put() method will return old property
values.
Otherwise, it returns
beanMapPutReturnsOldValue in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder beanMapPutReturnsOldValue()
BeanContextBuilder
Shortcut for calling beanMapPutReturnsOldValue(.
beanMapPutReturnsOldValue in class BeanTraverseBuilderpublic SerializerBuilder beanMethodVisibility(Visibility value)
BeanContextBuilderOnly look for bean methods with the specified minimum visibility.
beanMethodVisibility in class BeanTraverseBuildervalue - The new value for this property.
Visibility.PUBLICpublic SerializerBuilder beansRequireDefaultConstructor(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString() method.
beansRequireDefaultConstructor in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder beansRequireDefaultConstructor()
BeanContextBuilder
Shortcut for calling beansRequireDefaultConstructor(.
beansRequireDefaultConstructor in class BeanTraverseBuilderpublic SerializerBuilder beansRequireSerializable(boolean value)
BeanContextBuilder
If Serializable interface to be considered a bean.
Otherwise, the bean will be serialized as a string using the Object.toString() method.
beansRequireSerializable in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder beansRequireSerializable()
BeanContextBuilder
Shortcut for calling beansRequireSerializable(.
beansRequireSerializable in class BeanTraverseBuilderpublic SerializerBuilder beansRequireSettersForGetters(boolean value)
BeanContextBuilder
If
Otherwise, they will be ignored.
beansRequireSettersForGetters in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder beansRequireSettersForGetters()
BeanContextBuilder
Shortcut for calling beansRequireSettersForGetters(.
beansRequireSettersForGetters in class BeanTraverseBuilderpublic SerializerBuilder beansRequireSomeProperties(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString() method.
beansRequireSomeProperties in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder beanTypePropertyName(String value)
BeanContextBuilderThis specifies the name of the bean property used to store the dictionary name of a bean type so that the parser knows the data type to reconstruct.
beanTypePropertyName in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder bpi(Class<?> beanClass, String value)
BeanContextBuilderSpecifies the set and order of names of properties associated with the bean class.
bpi in class BeanTraverseBuilderbeanClass - The bean class.value - Comma-delimited list of property names.public SerializerBuilder bpi(Map<String,String> values)
BeanContextBuilderSpecifies the set and order of names of properties associated with the bean class.
bpi in class BeanTraverseBuildervalues - The new value for this property.public SerializerBuilder bpi(String beanClassName, String value)
BeanContextBuilderSpecifies the set and order of names of properties associated with the bean class.
bpi in class BeanTraverseBuilderbeanClassName - The bean class name.
value - Comma-delimited list of property names.public SerializerBuilder bpx(Class<?> beanClass, String properties)
BeanContextBuilderSpecifies to exclude the specified list of properties for the specified bean class.
bpx in class BeanTraverseBuilderbeanClass - The bean class.properties - Comma-delimited list of property names.public SerializerBuilder bpx(Map<String,String> values)
BeanContextBuilderSpecifies to exclude the specified list of properties for the specified bean classes.
bpx in class BeanTraverseBuildervalues - The new value for this property.public SerializerBuilder bpx(String beanClassName, String value)
BeanContextBuilderbpx in class BeanTraverseBuilderbeanClassName - The bean class name.
value - Comma-delimited list of property names.public SerializerBuilder bpro(Class<?> beanClass, String value)
BeanContextBuilderSpecifies the read-only properties for the specified bean class.
bpro in class BeanTraverseBuilderbeanClass - The bean class.value - Comma-delimited list of property names.public SerializerBuilder bpro(Map<String,String> values)
BeanContextBuilderSpecifies the read-only properties for the specified bean classes.
bpro in class BeanTraverseBuildervalues - The new value for this property.public SerializerBuilder bpro(String beanClassName, String value)
BeanContextBuilderSpecifies the read-only properties for the specified bean class.
bpro in class BeanTraverseBuilderbeanClassName - The bean class name.
value - Comma-delimited list of property names.public SerializerBuilder bpwo(Class<?> beanClass, String properties)
BeanContextBuilderSpecifies the write-only properties for the specified bean class.
bpwo in class BeanTraverseBuilderbeanClass - The bean class.properties - Comma-delimited list of property names.public SerializerBuilder bpwo(Map<String,String> values)
BeanContextBuilderSpecifies the write-only properties for the specified bean classes.
bpwo in class BeanTraverseBuildervalues - The new value for this property.public SerializerBuilder bpwo(String beanClassName, String value)
BeanContextBuilderSpecifies the write-only properties for the specified bean class.
bpwo in class BeanTraverseBuilderbeanClassName - The bean class name.
value - Comma-delimited list of property names.public SerializerBuilder debug()
BeanContextBuilder
Shortcut for calling debug(.
debug in class BeanTraverseBuilderpublic SerializerBuilder dictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but takes in an array of classes.
dictionary in class BeanTraverseBuildervalues - The values to add to this property.public SerializerBuilder dictionary(Object... values)
BeanContextBuilderAdds to the list of classes that make up the bean dictionary in this bean context.
dictionary in class BeanTraverseBuildervalues - The values to add to this property.public SerializerBuilder dictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but replaces the existing value.
dictionaryReplace in class BeanTraverseBuildervalues - The new values for this property.public SerializerBuilder dictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...) but replaces the existing value.
dictionaryReplace in class BeanTraverseBuildervalues - The new values for this property.public SerializerBuilder dictionaryRemove(Class<?>... values)
BeanContextBuilderRemoves from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove in class BeanTraverseBuildervalues - The values to remove from this property.public SerializerBuilder dictionaryRemove(Object... values)
BeanContextBuilderRemoves from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove in class BeanTraverseBuildervalues - The values to remove from this property.public <T> SerializerBuilder example(Class<T> c, T o)
BeanContextBuilderSpecifies an example of the specified class.
example in class BeanTraverseBuilderc - The POJO class.o - An instance of the POJO class used for examples.public <T> SerializerBuilder exampleJson(Class<T> c, String value)
BeanContextBuilderSpecifies an example of the specified class.
exampleJson in class BeanTraverseBuilderT - The POJO class type.c - The POJO class.value - The simple JSON representation of the example.public SerializerBuilder ignoreInvocationExceptionsOnGetters(boolean value)
BeanContextBuilder
If BeanRuntimeException is thrown.
ignoreInvocationExceptionsOnGetters in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder ignoreInvocationExceptionsOnGetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnGetters(.
ignoreInvocationExceptionsOnGetters in class BeanTraverseBuilderpublic SerializerBuilder ignoreInvocationExceptionsOnSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException is thrown.
ignoreInvocationExceptionsOnSetters in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder ignoreInvocationExceptionsOnSetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnSetters(.
ignoreInvocationExceptionsOnSetters in class BeanTraverseBuilderpublic SerializerBuilder ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException is thrown.
ignorePropertiesWithoutSetters in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder ignoreUnknownBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException is thrown.
ignoreUnknownBeanProperties in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder ignoreUnknownBeanProperties()
BeanContextBuilder
Shortcut for calling ignoreUnknownBeanProperties(.
ignoreUnknownBeanProperties in class BeanTraverseBuilderpublic SerializerBuilder ignoreUnknownNullBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException is thrown.
ignoreUnknownNullBeanProperties in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder implClass(Class<?> interfaceClass, Class<?> implClass)
BeanContextBuilderimplClass in class BeanTraverseBuilderinterfaceClass - The interface class.implClass - The implementation class.public SerializerBuilder implClasses(Map<String,Class<?>> values)
BeanContextBuilderFor interfaces and abstract classes this method can be used to specify an implementation class for the interface/abstract class so that instances of the implementation class are used when instantiated (e.g. during a parse).
implClasses in class BeanTraverseBuildervalues - The new value for this property.public SerializerBuilder locale(Locale value)
BeanContextBuilderSpecifies a default locale for serializer and parser sessions.
locale in class BeanTraverseBuildervalue - The new value for this property.public SerializerBuilder mediaType(MediaType value)
BeanContextBuilderSpecifies a default media type value for serializer and parser sessions.
mediaType in class BeanTraverseBuildervalue - The new value for this property.public SerializerBuilder notBeanClasses(Class<?>... values)
BeanContextBuilder
List of classes that should not be treated as beans even if they appear to be bean-like.
Not-bean classes are converted to
notBeanClasses in class BeanTraverseBuildervalues - The values to add to this property.public SerializerBuilder notBeanClasses(Object... values)
BeanContextBuilder
List of classes that should not be treated as beans even if they appear to be bean-like.
Not-bean classes are converted to
notBeanClasses in class BeanTraverseBuildervalues - The values to add to this property.
public SerializerBuilder notBeanClassesReplace(Class<?>... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace in class BeanTraverseBuildervalues - The new value for this property.public SerializerBuilder notBeanClassesReplace(Object... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace in class BeanTraverseBuildervalues - The new value for this property.
public SerializerBuilder notBeanClassesRemove(Class<?>... values)
BeanContextBuildernotBeanClassesRemove in class BeanTraverseBuildervalues - The values to remove from this property.public SerializerBuilder notBeanClassesRemove(Object... values)
BeanContextBuildernotBeanClassesRemove in class BeanTraverseBuildervalues - The values to remove from this property.
public SerializerBuilder notBeanPackages(Object... values)
BeanContextBuildernotBeanPackages in class BeanTraverseBuildervalues - The values to add to this property.
public SerializerBuilder notBeanPackages(String... values)
BeanContextBuildernotBeanPackages in class BeanTraverseBuildervalues - The values to add to this property.public SerializerBuilder notBeanPackagesReplace(String... values)
BeanContextBuildernotBeanPackagesReplace in class BeanTraverseBuildervalues - public SerializerBuilder notBeanPackagesReplace(Object... values)
BeanContextBuildernotBeanPackagesReplace in class BeanTraverseBuildervalues - public SerializerBuilder notBeanPackagesRemove(String... values)
BeanContextBuildernotBeanPackagesRemove in class BeanTraverseBuildervalues - The values to remove from this property.public SerializerBuilder notBeanPackagesRemove(Object... values)
BeanContextBuildernotBeanPackagesRemove in class BeanTraverseBuildervalues - public SerializerBuilder pojoSwaps(Class<?>... values)
BeanContextBuilderpojoSwaps in class BeanTraverseBuildervalues - The values to add to this property.public SerializerBuilder pojoSwaps(Object... values)
BeanContextBuilderpojoSwaps in class BeanTraverseBuildervalues - The values to add to this property.
PojoSwap.
SurrogateSwap.
public SerializerBuilder pojoSwapsReplace(Class<?>... values)
BeanContextBuilderpojoSwapsReplace in class BeanTraverseBuildervalues - The values to remove from this property.
PojoSwap.
SurrogateSwap.
public SerializerBuilder pojoSwapsReplace(Object... values)
BeanContextBuilderpojoSwapsReplace in class BeanTraverseBuildervalues - The values to remove from this property.
PojoSwap.
SurrogateSwap.
public SerializerBuilder pojoSwapsRemove(Class<?>... values)
BeanContextBuilderpojoSwapsRemove in class BeanTraverseBuildervalues - The values to remove from this property.
PojoSwap.
SurrogateSwap.
public SerializerBuilder pojoSwapsRemove(Object... values)
BeanContextBuilderpojoSwapsRemove in class BeanTraverseBuildervalues - The values to remove from this property.
PojoSwap.
SurrogateSwap.
public SerializerBuilder sortProperties(boolean value)
BeanContextBuilder
When
sortProperties in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder sortProperties()
BeanContextBuilder
Shortcut for calling sortProperties(.
sortProperties in class BeanTraverseBuilderpublic SerializerBuilder timeZone(TimeZone value)
BeanContextBuildertimeZone in class BeanTraverseBuildervalue - The new value for this property.public SerializerBuilder useEnumNames(boolean value)
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString().
useEnumNames in class BeanTraverseBuildervalue - The property value.public SerializerBuilder useEnumNames()
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString().
useEnumNames in class BeanTraverseBuilderpublic SerializerBuilder useInterfaceProxies(boolean value)
BeanContextBuilder
If InvocationHandler if there is no other way of instantiating them.
useInterfaceProxies in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder useJavaBeanIntrospector(boolean value)
BeanContextBuilderUsing the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
@Bean annotations will be ignored if you enable this setting.
useJavaBeanIntrospector in class BeanTraverseBuildervalue - The new value for this property.
public SerializerBuilder useJavaBeanIntrospector()
BeanContextBuilder
Shortcut for calling useJavaBeanIntrospector(.
useJavaBeanIntrospector in class BeanTraverseBuilderpublic SerializerBuilder set(String name, Object value)
ContextBuilderset in class BeanTraverseBuildername - The property name.value - The property value.PropertyStoreBuilder.set(String, Object)public SerializerBuilder set(Map<String,Object> properties)
ContextBuilderset in class BeanTraverseBuilderproperties - The properties to set on this class.PropertyStoreBuilder.set(java.util.Map)public SerializerBuilder add(Map<String,Object> properties)
ContextBuilderadd in class BeanTraverseBuilderproperties - The properties to set on this class.PropertyStoreBuilder.add(java.util.Map)public SerializerBuilder addTo(String name, Object value)
ContextBuilderaddTo in class BeanTraverseBuildername - The property name.value - The new value to add to the SET property.public SerializerBuilder addTo(String name, String key, Object value)
ContextBuilderaddTo in class BeanTraverseBuildername - The property name.key - The property value map key.value - The property value map value.public SerializerBuilder removeFrom(String name, Object value)
ContextBuilderremoveFrom in class BeanTraverseBuildername - The property name.value - The property value in the SET property.public SerializerBuilder apply(PropertyStore copyFrom)
ContextBuilderapply in class BeanTraverseBuildercopyFrom - The factory whose settings are being copied.public SerializerBuilder applyAnnotations(AnnotationList al, VarResolverSession vrs)
ContextBuilderapplyAnnotations in class BeanTraverseBuilderal - The list of all annotations annotated with PropertyStoreApply.vrs - The string resolver for resolving variables in annotation values.public SerializerBuilder applyAnnotations(Class<?> fromClass)
ContextBuilderApplies any of the following annotations:
BeanConfig
CsvConfig
HtmlConfig
HtmlDocConfig
JsoConfig
JsonConfig
JsonSchemaConfig
MsgPackConfig
OpenApiConfig
ParserConfig
PlainTextConfig
SerializerConfig
SoapXmlConfig
UonConfig
UrlEncodingConfig
XmlConfig
Annotations are appended in the following order:
applyAnnotations in class BeanTraverseBuilderfromClass - The class on which the annotations are defined.public SerializerBuilder applyAnnotations(Method fromMethod)
ContextBuilderApplies any of the following annotations:
BeanConfig
CsvConfig
HtmlConfig
HtmlDocConfig
JsoConfig
JsonConfig
JsonSchemaConfig
MsgPackConfig
OpenApiConfig
ParserConfig
PlainTextConfig
SerializerConfig
SoapXmlConfig
UonConfig
UrlEncodingConfig
XmlConfig
Annotations are appended in the following orders:
applyAnnotations in class BeanTraverseBuilderfromMethod - The method on which the annotations are defined.public Serializer build()
ContextBuilderbuild in class BeanTraverseBuilderCopyright © 2016–2019 The Apache Software Foundation. All rights reserved.