public class SerializerBuilder extends BeanContextBuilder
psb
Constructor and Description |
---|
SerializerBuilder()
Constructor, default settings.
|
SerializerBuilder(PropertyStore ps)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SerializerBuilder |
abridged()
Configuration property: Abridged output.
|
SerializerBuilder |
abridged(boolean value)
Configuration property: Abridged output.
|
SerializerBuilder |
add(Map<String,Object> properties)
Adds multiple configuration properties on this object.
|
SerializerBuilder |
addBeanTypeProperties(boolean value)
Configuration property: Add
|
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 |
beanClassVisibility(Visibility value)
Configuration property: Minimum bean class visibility.
|
SerializerBuilder |
beanConstructorVisibility(Visibility value)
Configuration property: Minimum bean constructor visibility.
|
SerializerBuilder |
beanDictionary(boolean append,
Object... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
beanDictionary(Class<?>... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
beanDictionary(Object... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
beanDictionaryRemove(Object... values)
Configuration property: Bean dictionary.
|
SerializerBuilder |
beanFieldVisibility(Visibility value)
Configuration property: Minimum bean field visibility.
|
SerializerBuilder |
beanFilters(boolean append,
Object... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanFilters(Class<?>... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanFilters(Object... values)
Configuration property: Bean filters.
|
SerializerBuilder |
beanFiltersRemove(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.
|
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 |
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.
|
<T> SerializerBuilder |
implClass(Class<T> interfaceClass,
Class<? extends T> 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 serialization depth.
|
SerializerBuilder |
maxIndent(int value)
Configuration property: Maximum indentation.
|
SerializerBuilder |
mediaType(MediaType value)
Configuration property: Media type.
|
SerializerBuilder |
notBeanClasses(boolean append,
Object... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanClasses(Class<?>... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanClasses(Object... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanClassesRemove(Object... values)
Configuration property: Bean class exclusions.
|
SerializerBuilder |
notBeanPackages(boolean append,
Object... values)
Configuration property: Bean package 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 |
pojoSwaps(boolean append,
Object... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
pojoSwaps(Class<?>... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
pojoSwaps(Object... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
pojoSwapsRemove(Object... values)
Configuration property: POJO swaps.
|
SerializerBuilder |
quoteChar(char value)
Configuration property: Quote character.
|
SerializerBuilder |
removeFrom(String name,
Object value)
Removes a value from a SET, LIST, or MAP property.
|
SerializerBuilder |
set(boolean append,
String name,
Object value)
Sets or adds to a SET or LIST 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 |
sq()
Configuration property: Quote character.
|
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 |
useInterfaceProxies(boolean value)
Configuration property: Use interface proxies.
|
SerializerBuilder |
useJavaBeanIntrospector()
Configuration property: Use Java Introspector.
|
SerializerBuilder |
useJavaBeanIntrospector(boolean value)
Configuration property: Use Java Introspector.
|
SerializerBuilder |
useWhitespace()
Configuration property: Use whitespace.
|
SerializerBuilder |
useWhitespace(boolean value)
Configuration property: Use whitespace.
|
SerializerBuilder |
ws()
Configuration property: Use whitespace.
|
debug, excludeProperties, excludeProperties, excludeProperties, includeProperties, includeProperties, includeProperties, propertyNamer
build, getPropertyStore, getPropertyStoreBuilder
public SerializerBuilder()
public SerializerBuilder(PropertyStore ps)
ps
- The initial configuration settings for this builder.public SerializerBuilder abridged(boolean value)
When enabled, 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 abridged()
Shortcut for calling abridged(
.
public SerializerBuilder addBeanTypeProperties(boolean value)
If
value
- The new value for this property.
public SerializerBuilder detectRecursions(boolean value)
Specifies that recursions should be checked for during serialization.
value
- The new value for this property.
public SerializerBuilder detectRecursions()
Shortcut for calling detectRecursions(
.
public SerializerBuilder ignoreRecursions(boolean value)
If
value
- The new value for this property.
public SerializerBuilder ignoreRecursions()
Shortcut for calling ignoreRecursions(
.
public SerializerBuilder initialDepth(int value)
The initial indentation level at the root.
value
- The new value for this property.
0
.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 maxDepth(int value)
Abort serialization 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 serialize models with recursive references.
value
- The new value for this property.
100
.public SerializerBuilder maxIndent(int value)
Specifies the maximum indentation level in the serialized document.
value
- The new value for this property.
100
.public SerializerBuilder quoteChar(char value)
This is the character used for quoting attributes and values.
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 sq()
Shortcut for calling quoteChar(
.
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.RESOURCE
public 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.RESOURCE
public SerializerBuilder uriResolution(UriResolution value)
Defines the resolution level for URIs when serializing URI/URL objects.
value
- The new value for this property.
UriResolution.NONE
public 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.NONE
public SerializerBuilder useWhitespace(boolean value)
If
value
- The new value for this property.
public SerializerBuilder useWhitespace()
Shortcut for calling useWhitespace(
.
public SerializerBuilder ws()
Shortcut for calling useWhitespace(
.
public SerializerBuilder beansRequireDefaultConstructor(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
beansRequireDefaultConstructor
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder beansRequireDefaultConstructor()
BeanContextBuilder
Shortcut for calling beansRequireDefaultConstructor(
.
beansRequireDefaultConstructor
in class BeanContextBuilder
public 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 BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder beansRequireSerializable()
BeanContextBuilder
Shortcut for calling beansRequireSerializable(
.
beansRequireSerializable
in class BeanContextBuilder
public SerializerBuilder beansRequireSettersForGetters(boolean value)
BeanContextBuilder
If
Otherwise, they will be ignored.
beansRequireSettersForGetters
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder beansRequireSettersForGetters()
BeanContextBuilder
Shortcut for calling beansRequireSettersForGetters(
.
beansRequireSettersForGetters
in class BeanContextBuilder
public SerializerBuilder beansRequireSomeProperties(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
beansRequireSomeProperties
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder beanMapPutReturnsOldValue(boolean value)
BeanContextBuilder
If BeanMap.put()
method will return old property
values.
Otherwise, it returns
beanMapPutReturnsOldValue
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder beanMapPutReturnsOldValue()
BeanContextBuilder
Shortcut for calling beanMapPutReturnsOldValue(
.
beanMapPutReturnsOldValue
in class BeanContextBuilder
public SerializerBuilder beanConstructorVisibility(Visibility value)
BeanContextBuilder
Only look for constructors with the specified minimum visibility.
beanConstructorVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public SerializerBuilder beanClassVisibility(Visibility value)
BeanContextBuilder
Classes are not considered beans unless they meet the minimum visibility requirements.
For example, if the visibility is PUBLIC
and the bean class is
beanClassVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public SerializerBuilder beanFieldVisibility(Visibility value)
BeanContextBuilder
Only look for bean fields with the specified minimum visibility.
beanFieldVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public SerializerBuilder beanMethodVisibility(Visibility value)
BeanContextBuilder
Only look for bean methods with the specified minimum visibility.
beanMethodVisibility
in class BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
public SerializerBuilder useJavaBeanIntrospector(boolean value)
BeanContextBuilder
Using 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 BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder useJavaBeanIntrospector()
BeanContextBuilder
Shortcut for calling useJavaBeanIntrospector(
.
useJavaBeanIntrospector
in class BeanContextBuilder
public SerializerBuilder useInterfaceProxies(boolean value)
BeanContextBuilder
If InvocationHandler
if there is no other way of instantiating them.
useInterfaceProxies
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder ignoreUnknownBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownBeanProperties
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder ignoreUnknownBeanProperties()
BeanContextBuilder
Shortcut for calling ignoreUnknownBeanProperties(
.
ignoreUnknownBeanProperties
in class BeanContextBuilder
public SerializerBuilder ignoreUnknownNullBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownNullBeanProperties
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignorePropertiesWithoutSetters
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder ignoreInvocationExceptionsOnGetters(boolean value)
BeanContextBuilder
If BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder ignoreInvocationExceptionsOnGetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnGetters(
.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
public SerializerBuilder ignoreInvocationExceptionsOnSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder ignoreInvocationExceptionsOnSetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnSetters(
.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
public SerializerBuilder sortProperties(boolean value)
BeanContextBuilder
When
sortProperties
in class BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder sortProperties()
BeanContextBuilder
Shortcut for calling sortProperties(
.
sortProperties
in class BeanContextBuilder
public SerializerBuilder notBeanPackages(Object... values)
BeanContextBuilder
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.
public SerializerBuilder notBeanPackages(String... values)
BeanContextBuilder
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.public SerializerBuilder notBeanPackages(boolean append, Object... values)
BeanContextBuilder
When specified, the current list of ignore packages are appended to.
notBeanPackages
in class BeanContextBuilder
append
- If values
- The new values for this property.
public SerializerBuilder notBeanPackagesRemove(Object... values)
BeanContextBuilder
notBeanPackagesRemove
in class BeanContextBuilder
values
- 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 Strings
during serialization.
notBeanClasses
in class BeanContextBuilder
values
- The values to add to 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 Strings
during serialization.
notBeanClasses
in class BeanContextBuilder
values
- The values to add to this property.public SerializerBuilder notBeanClasses(boolean append, Object... values)
BeanContextBuilder
Not-bean classes are converted to Strings
during serialization even if they appear to be
bean-like.
notBeanClasses
in class BeanContextBuilder
append
- If values
- The new value for this property.
public SerializerBuilder notBeanClassesRemove(Object... values)
BeanContextBuilder
notBeanClassesRemove
in class BeanContextBuilder
values
- The values to remove from 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 BeanContextBuilder
values
- 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 beanFilters(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but takes in an array of classes.
beanFilters
in class BeanContextBuilder
values
- The values to add to this property.public SerializerBuilder beanFilters(boolean append, Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but allows you to optionally overwrite the previous value.
beanFilters
in class BeanContextBuilder
append
- If values
- 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(Object... values)
BeanContextBuilder
Removes from the list of classes that make up the bean filters in this bean context.
beanFiltersRemove
in class BeanContextBuilder
values
- 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 pojoSwaps(Object... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.
PojoSwap
.
SurrogateSwap
.
public SerializerBuilder pojoSwaps(Class<?>... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.public SerializerBuilder pojoSwaps(boolean append, Object... values)
BeanContextBuilder
POJO swaps are used to "swap out" non-serializable classes with serializable equivalents during serialization, and "swap in" the non-serializable class during parsing.
An example of a POJO swap would be a Calendar
object that gets swapped out for an ISO8601 string.
pojoSwaps
in class BeanContextBuilder
append
- If values
- The new value for this property.
public SerializerBuilder pojoSwapsRemove(Object... values)
BeanContextBuilder
pojoSwapsRemove
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public SerializerBuilder implClasses(Map<String,Class<?>> values)
BeanContextBuilder
For 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 BeanContextBuilder
values
- The new value for this property.public <T> SerializerBuilder implClass(Class<T> interfaceClass, Class<? extends T> implClass)
BeanContextBuilder
implClass
in class BeanContextBuilder
T
- The class type of the interface.interfaceClass
- The interface class.implClass
- The implementation class.public SerializerBuilder beanDictionary(Object... values)
BeanContextBuilder
Adds to the list of classes that make up the bean dictionary in this bean context.
beanDictionary
in class BeanContextBuilder
values
- The values to add to this property.public SerializerBuilder beanDictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but takes in an array of classes.
beanDictionary
in class BeanContextBuilder
values
- The values to add to this property.public SerializerBuilder beanDictionary(boolean append, Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but allows you to optionally overwrite the previous value.
beanDictionary
in class BeanContextBuilder
append
- If values
- The new values for this property.public SerializerBuilder beanDictionaryRemove(Object... values)
BeanContextBuilder
Removes from the list of classes that make up the bean dictionary in this bean context.
beanDictionaryRemove
in class BeanContextBuilder
values
- The values to remove from this property.public SerializerBuilder beanTypePropertyName(String value)
BeanContextBuilder
This 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 BeanContextBuilder
value
- The new value for this property.
public SerializerBuilder locale(Locale value)
BeanContextBuilder
Specifies a default locale for serializer and parser sessions.
locale
in class BeanContextBuilder
value
- The new value for this property.public SerializerBuilder timeZone(TimeZone value)
BeanContextBuilder
timeZone
in class BeanContextBuilder
value
- The new value for this property.public SerializerBuilder mediaType(MediaType value)
BeanContextBuilder
Specifies a default media type value for serializer and parser sessions.
mediaType
in class BeanContextBuilder
value
- The new value for this property.public SerializerBuilder debug()
BeanContextBuilder
Shortcut for calling debug(
.
debug
in class BeanContextBuilder
public SerializerBuilder set(String name, Object value)
ContextBuilder
set
in class BeanContextBuilder
name
- The property name.value
- The property value.PropertyStoreBuilder.set(String, Object)
public SerializerBuilder set(boolean append, String name, Object value)
ContextBuilder
set
in class BeanContextBuilder
append
- If name
- The property name.value
- The property value.PropertyStoreBuilder.set(String, Object)
public SerializerBuilder set(Map<String,Object> properties)
ContextBuilder
set
in class BeanContextBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.set(java.util.Map)
public SerializerBuilder add(Map<String,Object> properties)
ContextBuilder
add
in class BeanContextBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.add(java.util.Map)
public SerializerBuilder addTo(String name, Object value)
ContextBuilder
addTo
in class BeanContextBuilder
name
- The property name.value
- The new value to add to the SET property.public SerializerBuilder addTo(String name, String key, Object value)
ContextBuilder
addTo
in class BeanContextBuilder
name
- The property name.key
- The property value map key.value
- The property value map value.public SerializerBuilder removeFrom(String name, Object value)
ContextBuilder
removeFrom
in class BeanContextBuilder
name
- The property name.value
- The property value in the SET property.public SerializerBuilder apply(PropertyStore copyFrom)
ContextBuilder
apply
in class BeanContextBuilder
copyFrom
- The factory whose settings are being copied.public Serializer build()
ContextBuilder
build
in class BeanContextBuilder
Copyright © 2018 Apache. All rights reserved.