public class OutputStreamSerializerBuilder extends SerializerBuilder
psb
Constructor and Description |
---|
OutputStreamSerializerBuilder()
Constructor, default settings.
|
OutputStreamSerializerBuilder(PropertyStore ps)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
OutputStreamSerializerBuilder |
add(Map<String,Object> properties)
Adds multiple configuration properties on this object.
|
OutputStreamSerializerBuilder |
addTo(String name,
Object value)
Adds a value to a SET or LIST property.
|
OutputStreamSerializerBuilder |
addTo(String name,
String key,
Object value)
Adds or overwrites a value to a SET, LIST, or MAP property.
|
OutputStreamSerializerBuilder |
annotations(Annotation... values)
Configuration property: Annotations.
|
OutputStreamSerializerBuilder |
apply(PropertyStore copyFrom)
Copies the settings from the specified property store into this builder.
|
OutputStreamSerializerBuilder |
applyAnnotations(AnnotationList al,
VarResolverSession vrs)
Applies a set of annotations to this property store.
|
OutputStreamSerializerBuilder |
applyAnnotations(Class<?>... fromClasses)
Applies any of the various
|
OutputStreamSerializerBuilder |
applyAnnotations(Method... fromMethods)
Applies any of the various
|
OutputStreamSerializerBuilder |
beanClassVisibility(Visibility value)
Configuration property: Minimum bean class visibility.
|
OutputStreamSerializerBuilder |
beanConstructorVisibility(Visibility value)
Configuration property: Minimum bean constructor visibility.
|
OutputStreamSerializerBuilder |
beanDictionary(Class<?>... values)
Deprecated.
|
OutputStreamSerializerBuilder |
beanDictionary(Object... values)
Deprecated.
|
OutputStreamSerializerBuilder |
beanDictionaryRemove(Class<?>... values)
Deprecated.
|
OutputStreamSerializerBuilder |
beanDictionaryRemove(Object... values)
Deprecated.
|
OutputStreamSerializerBuilder |
beanDictionaryReplace(Class<?>... values)
Deprecated.
|
OutputStreamSerializerBuilder |
beanDictionaryReplace(Object... values)
Deprecated.
|
OutputStreamSerializerBuilder |
beanFieldVisibility(Visibility value)
Configuration property: Minimum bean field visibility.
|
OutputStreamSerializerBuilder |
beanFilters(Class<?>... values)
Configuration property: Bean filters.
|
OutputStreamSerializerBuilder |
beanFilters(Object... values)
Configuration property: Bean filters.
|
OutputStreamSerializerBuilder |
beanFiltersRemove(Class<?>... values)
Configuration property: Bean filters.
|
OutputStreamSerializerBuilder |
beanFiltersRemove(Object... values)
Configuration property: Bean filters.
|
OutputStreamSerializerBuilder |
beanFiltersReplace(Class<?>... values)
Configuration property: Bean filters.
|
OutputStreamSerializerBuilder |
beanFiltersReplace(Object... values)
Configuration property: Bean filters.
|
OutputStreamSerializerBuilder |
beanMapPutReturnsOldValue()
Configuration property: BeanMap.put() returns old property value.
|
OutputStreamSerializerBuilder |
beanMapPutReturnsOldValue(boolean value)
Configuration property: BeanMap.put() returns old property value.
|
OutputStreamSerializerBuilder |
beanMethodVisibility(Visibility value)
Configuration property: Minimum bean method visibility.
|
OutputStreamSerializerBuilder |
beansRequireDefaultConstructor()
Configuration property: Beans require no-arg constructors.
|
OutputStreamSerializerBuilder |
beansRequireDefaultConstructor(boolean value)
Configuration property: Beans require no-arg constructors.
|
OutputStreamSerializerBuilder |
beansRequireSerializable()
Configuration property: Beans require Serializable interface.
|
OutputStreamSerializerBuilder |
beansRequireSerializable(boolean value)
Configuration property: Beans require Serializable interface.
|
OutputStreamSerializerBuilder |
beansRequireSettersForGetters()
Configuration property: Beans require setters for getters.
|
OutputStreamSerializerBuilder |
beansRequireSettersForGetters(boolean value)
Configuration property: Beans require setters for getters.
|
OutputStreamSerializerBuilder |
beansRequireSomeProperties(boolean value)
Configuration property: Beans require at least one property.
|
OutputStreamSerializerBuilder |
beanTypePropertyName(String value)
Configuration property: Bean type property name.
|
OutputStreamSerializerBuilder |
binaryFormat(BinaryFormat value)
Configuration property: Binary output format.
|
OutputStreamSerializerBuilder |
binaryFormat(String value)
Configuration property: Binary output format.
|
OutputStreamSerializerBuilder |
bpi(Class<?> beanClass,
String value)
Configuration property: Bean property includes.
|
OutputStreamSerializerBuilder |
bpi(Map<String,String> values)
Configuration property: Bean property includes.
|
OutputStreamSerializerBuilder |
bpi(String beanClassName,
String value)
Configuration property: Bean property includes.
|
OutputStreamSerializerBuilder |
bpro(Class<?> beanClass,
String value)
Configuration property: Read-only bean properties.
|
OutputStreamSerializerBuilder |
bpro(Map<String,String> values)
Configuration property: Read-only bean properties.
|
OutputStreamSerializerBuilder |
bpro(String beanClassName,
String value)
Configuration property: Read-only bean properties.
|
OutputStreamSerializerBuilder |
bpwo(Class<?> beanClass,
String properties)
Configuration property: Write-only bean properties.
|
OutputStreamSerializerBuilder |
bpwo(Map<String,String> values)
Configuration property: Write-only bean properties.
|
OutputStreamSerializerBuilder |
bpwo(String beanClassName,
String value)
Configuration property: Write-only bean properties.
|
OutputStreamSerializerBuilder |
bpx(Class<?> beanClass,
String properties)
Configuration property: Bean property excludes.
|
OutputStreamSerializerBuilder |
bpx(Map<String,String> values)
Configuration property: Bean property excludes.
|
OutputStreamSerializerBuilder |
bpx(String beanClassName,
String value)
Configuration property: Bean property excludes.
|
OutputStreamSerializer |
build()
Build the object.
|
OutputStreamSerializerBuilder |
debug()
Configuration property: Debug mode.
|
OutputStreamSerializerBuilder |
dictionary(Class<?>... values)
Configuration property: Bean dictionary.
|
OutputStreamSerializerBuilder |
dictionary(Object... values)
Configuration property: Bean dictionary.
|
OutputStreamSerializerBuilder |
dictionaryRemove(Class<?>... values)
Configuration property: Bean dictionary.
|
OutputStreamSerializerBuilder |
dictionaryRemove(Object... values)
Configuration property: Bean dictionary.
|
OutputStreamSerializerBuilder |
dictionaryReplace(Class<?>... values)
Configuration property: Bean dictionary.
|
OutputStreamSerializerBuilder |
dictionaryReplace(Object... values)
Configuration property: Bean dictionary.
|
<T> OutputStreamSerializerBuilder |
example(Class<T> c,
T o)
Configuration property: POJO example.
|
<T> OutputStreamSerializerBuilder |
exampleJson(Class<T> c,
String value)
Configuration property: POJO example.
|
OutputStreamSerializerBuilder |
ignoreInvocationExceptionsOnGetters()
Configuration property: Ignore invocation errors on getters.
|
OutputStreamSerializerBuilder |
ignoreInvocationExceptionsOnGetters(boolean value)
Configuration property: Ignore invocation errors on getters.
|
OutputStreamSerializerBuilder |
ignoreInvocationExceptionsOnSetters()
Configuration property: Ignore invocation errors on setters.
|
OutputStreamSerializerBuilder |
ignoreInvocationExceptionsOnSetters(boolean value)
Configuration property: Ignore invocation errors on setters.
|
OutputStreamSerializerBuilder |
ignorePropertiesWithoutSetters(boolean value)
Configuration property: Ignore properties without setters.
|
OutputStreamSerializerBuilder |
ignoreUnknownBeanProperties()
Configuration property: Ignore unknown properties.
|
OutputStreamSerializerBuilder |
ignoreUnknownBeanProperties(boolean value)
Configuration property: Ignore unknown properties.
|
OutputStreamSerializerBuilder |
ignoreUnknownNullBeanProperties(boolean value)
Configuration property: Ignore unknown properties with null values.
|
OutputStreamSerializerBuilder |
implClass(Class<?> interfaceClass,
Class<?> implClass)
Configuration property: Implementation classes.
|
OutputStreamSerializerBuilder |
implClasses(Map<String,Class<?>> values)
Configuration property: Implementation classes.
|
OutputStreamSerializerBuilder |
locale(Locale value)
Configuration property: Locale.
|
OutputStreamSerializerBuilder |
mediaType(MediaType value)
Configuration property: Media type.
|
OutputStreamSerializerBuilder |
notBeanClasses(Class<?>... values)
Configuration property: Bean class exclusions.
|
OutputStreamSerializerBuilder |
notBeanClasses(Object... values)
Configuration property: Bean class exclusions.
|
OutputStreamSerializerBuilder |
notBeanClassesRemove(Class<?>... values)
Configuration property: Bean class exclusions.
|
OutputStreamSerializerBuilder |
notBeanClassesRemove(Object... values)
Configuration property: Bean class exclusions.
|
OutputStreamSerializerBuilder |
notBeanClassesReplace(Class<?>... values)
Configuration property: Bean class exclusions.
|
OutputStreamSerializerBuilder |
notBeanClassesReplace(Object... values)
Configuration property: Bean class exclusions.
|
OutputStreamSerializerBuilder |
notBeanPackages(Object... values)
Configuration property: Bean package exclusions.
|
OutputStreamSerializerBuilder |
notBeanPackages(String... values)
Configuration property: Bean package exclusions.
|
OutputStreamSerializerBuilder |
notBeanPackagesRemove(Object... values)
Configuration property: Bean package exclusions.
|
OutputStreamSerializerBuilder |
notBeanPackagesRemove(String... values)
Configuration property: Bean package exclusions.
|
OutputStreamSerializerBuilder |
notBeanPackagesReplace(Object... values)
Configuration property: Bean package exclusions.
|
OutputStreamSerializerBuilder |
notBeanPackagesReplace(String... values)
Configuration property: Bean package exclusions.
|
OutputStreamSerializerBuilder |
pojoSwaps(Class<?>... values)
Configuration property: POJO swaps.
|
OutputStreamSerializerBuilder |
pojoSwaps(Object... values)
Configuration property: POJO swaps.
|
OutputStreamSerializerBuilder |
pojoSwapsRemove(Class<?>... values)
Configuration property: POJO swaps.
|
OutputStreamSerializerBuilder |
pojoSwapsRemove(Object... values)
Configuration property: POJO swaps.
|
OutputStreamSerializerBuilder |
pojoSwapsReplace(Class<?>... values)
Configuration property: POJO swaps.
|
OutputStreamSerializerBuilder |
pojoSwapsReplace(Object... values)
Configuration property: POJO swaps.
|
OutputStreamSerializerBuilder |
removeFrom(String name,
Object value)
Removes a value from a SET, LIST, or MAP property.
|
OutputStreamSerializerBuilder |
set(Map<String,Object> properties)
Sets multiple configuration properties on this object.
|
OutputStreamSerializerBuilder |
set(String name,
Object value)
Sets a configuration property on this object.
|
OutputStreamSerializerBuilder |
sortProperties()
Configuration property: Sort bean properties.
|
OutputStreamSerializerBuilder |
sortProperties(boolean value)
Configuration property: Sort bean properties.
|
OutputStreamSerializerBuilder |
timeZone(TimeZone value)
Configuration property: TimeZone.
|
OutputStreamSerializerBuilder |
useEnumNames()
Configuration property: Use enum names.
|
OutputStreamSerializerBuilder |
useEnumNames(boolean value)
Configuration property: Use enum names.
|
OutputStreamSerializerBuilder |
useInterfaceProxies(boolean value)
Configuration property: Use interface proxies.
|
OutputStreamSerializerBuilder |
useJavaBeanIntrospector()
Configuration property: Use Java Introspector.
|
OutputStreamSerializerBuilder |
useJavaBeanIntrospector(boolean value)
Configuration property: Use Java Introspector.
|
addBeanTypes, addBeanTypes, addRootType, addRootType, detectRecursions, detectRecursions, ignoreRecursions, ignoreRecursions, initialDepth, listener, maxDepth, sortCollections, sortCollections, sortMaps, sortMaps, trimEmptyCollections, trimEmptyCollections, trimEmptyMaps, trimEmptyMaps, trimNullProperties, trimStrings, trimStrings, uriContext, uriContext, uriRelativity, uriRelativity, uriResolution, uriResolution
debug, examples, excludeProperties, excludeProperties, excludeProperties, fluentSetters, fluentSetters, includeProperties, includeProperties, includeProperties, propertyNamer
build, getPropertyStore, getPropertyStoreBuilder, peek, peek
public OutputStreamSerializerBuilder()
public OutputStreamSerializerBuilder(PropertyStore ps)
ps
- The initial configuration settings for this builder.public OutputStreamSerializerBuilder binaryFormat(BinaryFormat value)
When using the Serializer.serializeToString(Object)
method on stream-based serializers, this defines the format to use
when converting the resulting byte array to a string.
value
- The new value for this property.
BinaryFormat.HEX
.public OutputStreamSerializerBuilder binaryFormat(String value)
When using the Serializer.serializeToString(Object)
method on stream-based serializers, this defines the format to use
when converting the resulting byte array to a string.
value
- The new value for this property.
BinaryFormat.HEX
.public OutputStreamSerializerBuilder annotations(Annotation... values)
BeanContextBuilder
Defines annotations to apply to specific classes and methods.
Allows you to dynamically apply Juneau annotations typically applied directly to classes and methods. Useful in cases where you want to use the functionality of the annotation on beans and bean properties but do not have access to the code to do so.
annotations
in class SerializerBuilder
values
- The values to add to this property.public OutputStreamSerializerBuilder beanClassVisibility(Visibility value)
BeanContextBuilder
Classes are not considered beans unless they meet the minimum visibility requirements.
For example, if the visibility is
beanClassVisibility
in class SerializerBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public OutputStreamSerializerBuilder beanConstructorVisibility(Visibility value)
BeanContextBuilder
Only look for constructors with the specified minimum visibility.
beanConstructorVisibility
in class SerializerBuilder
value
- The new value for this property.
Visibility.PUBLIC
.@Deprecated public OutputStreamSerializerBuilder beanDictionary(Class<?>... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Class...)
Same as BeanContextBuilder.beanDictionary(Object...)
but takes in an array of classes.
beanDictionary
in class SerializerBuilder
values
- The values to add to this property.@Deprecated public OutputStreamSerializerBuilder beanDictionary(Object... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Object...)
Adds to the list of classes that make up the bean dictionary in this bean context.
beanDictionary
in class SerializerBuilder
values
- The values to add to this property.@Deprecated public OutputStreamSerializerBuilder beanDictionaryReplace(Class<?>... values)
BeanContextBuilder
BeanContextBuilder.dictionaryReplace(Class...)
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
beanDictionaryReplace
in class SerializerBuilder
values
- The new values for this property.@Deprecated public OutputStreamSerializerBuilder beanDictionaryReplace(Object... values)
BeanContextBuilder
BeanContextBuilder.dictionaryReplace(Object...)
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
beanDictionaryReplace
in class SerializerBuilder
values
- The new values for this property.@Deprecated public OutputStreamSerializerBuilder beanDictionaryRemove(Class<?>... values)
BeanContextBuilder
BeanContextBuilder.dictionaryRemove(Class...)
Removes from the list of classes that make up the bean dictionary in this bean context.
beanDictionaryRemove
in class SerializerBuilder
values
- The values to remove from this property.@Deprecated public OutputStreamSerializerBuilder beanDictionaryRemove(Object... values)
BeanContextBuilder
BeanContextBuilder.dictionaryRemove(Object...)
Removes from the list of classes that make up the bean dictionary in this bean context.
beanDictionaryRemove
in class SerializerBuilder
values
- The values to remove from this property.public OutputStreamSerializerBuilder beanFieldVisibility(Visibility value)
BeanContextBuilder
Only look for bean fields with the specified minimum visibility.
beanFieldVisibility
in class SerializerBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public OutputStreamSerializerBuilder beanFilters(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but takes in an array of classes.
beanFilters
in class SerializerBuilder
values
- The values to add to this property.public OutputStreamSerializerBuilder 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 SerializerBuilder
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 OutputStreamSerializerBuilder beanFiltersReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but replaces the existing values.
beanFiltersReplace
in class SerializerBuilder
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 OutputStreamSerializerBuilder beanFiltersReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but replaces the existing values.
beanFiltersReplace
in class SerializerBuilder
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 OutputStreamSerializerBuilder beanFiltersRemove(Class<?>... values)
BeanContextBuilder
Removes from the list of classes that make up the bean filters in this bean context.
beanFiltersRemove
in class SerializerBuilder
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 OutputStreamSerializerBuilder beanFiltersRemove(Object... values)
BeanContextBuilder
Removes from the list of classes that make up the bean filters in this bean context.
beanFiltersRemove
in class SerializerBuilder
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 OutputStreamSerializerBuilder beanMapPutReturnsOldValue(boolean value)
BeanContextBuilder
If BeanMap.put()
method will return old property
values.
Otherwise, it returns
beanMapPutReturnsOldValue
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder beanMapPutReturnsOldValue()
BeanContextBuilder
Shortcut for calling beanMapPutReturnsOldValue(
.
beanMapPutReturnsOldValue
in class SerializerBuilder
public OutputStreamSerializerBuilder beanMethodVisibility(Visibility value)
BeanContextBuilder
Only look for bean methods with the specified minimum visibility.
beanMethodVisibility
in class SerializerBuilder
value
- The new value for this property.
Visibility.PUBLIC
public OutputStreamSerializerBuilder beansRequireDefaultConstructor(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
beansRequireDefaultConstructor
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder beansRequireDefaultConstructor()
BeanContextBuilder
Shortcut for calling beansRequireDefaultConstructor(
.
beansRequireDefaultConstructor
in class SerializerBuilder
public OutputStreamSerializerBuilder 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 SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder beansRequireSerializable()
BeanContextBuilder
Shortcut for calling beansRequireSerializable(
.
beansRequireSerializable
in class SerializerBuilder
public OutputStreamSerializerBuilder beansRequireSettersForGetters(boolean value)
BeanContextBuilder
If
Otherwise, they will be ignored.
beansRequireSettersForGetters
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder beansRequireSettersForGetters()
BeanContextBuilder
Shortcut for calling beansRequireSettersForGetters(
.
beansRequireSettersForGetters
in class SerializerBuilder
public OutputStreamSerializerBuilder beansRequireSomeProperties(boolean value)
BeanContextBuilder
If
Otherwise, the bean will be serialized as a string using the Object.toString()
method.
beansRequireSomeProperties
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder 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 SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder bpi(Class<?> beanClass, String value)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class SerializerBuilder
beanClass
- The bean class.value
- Comma-delimited list of property names.public OutputStreamSerializerBuilder bpi(Map<String,String> values)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class SerializerBuilder
values
- The new value for this property.public OutputStreamSerializerBuilder bpi(String beanClassName, String value)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class SerializerBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public OutputStreamSerializerBuilder bpx(Class<?> beanClass, String properties)
BeanContextBuilder
Specifies to exclude the specified list of properties for the specified bean class.
bpx
in class SerializerBuilder
beanClass
- The bean class.properties
- Comma-delimited list of property names.public OutputStreamSerializerBuilder bpx(Map<String,String> values)
BeanContextBuilder
Specifies to exclude the specified list of properties for the specified bean classes.
bpx
in class SerializerBuilder
values
- The new value for this property.public OutputStreamSerializerBuilder bpx(String beanClassName, String value)
BeanContextBuilder
bpx
in class SerializerBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public OutputStreamSerializerBuilder bpro(Class<?> beanClass, String value)
BeanContextBuilder
Specifies the read-only properties for the specified bean class.
bpro
in class SerializerBuilder
beanClass
- The bean class.value
- Comma-delimited list of property names.public OutputStreamSerializerBuilder bpro(Map<String,String> values)
BeanContextBuilder
Specifies the read-only properties for the specified bean classes.
bpro
in class SerializerBuilder
values
- The new value for this property.public OutputStreamSerializerBuilder bpro(String beanClassName, String value)
BeanContextBuilder
Specifies the read-only properties for the specified bean class.
bpro
in class SerializerBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public OutputStreamSerializerBuilder bpwo(Class<?> beanClass, String properties)
BeanContextBuilder
Specifies the write-only properties for the specified bean class.
bpwo
in class SerializerBuilder
beanClass
- The bean class.properties
- Comma-delimited list of property names.public OutputStreamSerializerBuilder bpwo(Map<String,String> values)
BeanContextBuilder
Specifies the write-only properties for the specified bean classes.
bpwo
in class SerializerBuilder
values
- The new value for this property.public OutputStreamSerializerBuilder bpwo(String beanClassName, String value)
BeanContextBuilder
Specifies the write-only properties for the specified bean class.
bpwo
in class SerializerBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public OutputStreamSerializerBuilder debug()
BeanContextBuilder
Shortcut for calling debug(
.
debug
in class SerializerBuilder
public OutputStreamSerializerBuilder dictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but takes in an array of classes.
dictionary
in class SerializerBuilder
values
- The values to add to this property.public OutputStreamSerializerBuilder dictionary(Object... values)
BeanContextBuilder
Adds to the list of classes that make up the bean dictionary in this bean context.
dictionary
in class SerializerBuilder
values
- The values to add to this property.public OutputStreamSerializerBuilder dictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
dictionaryReplace
in class SerializerBuilder
values
- The new values for this property.public OutputStreamSerializerBuilder dictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
dictionaryReplace
in class SerializerBuilder
values
- The new values for this property.public OutputStreamSerializerBuilder dictionaryRemove(Class<?>... values)
BeanContextBuilder
Removes from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove
in class SerializerBuilder
values
- The values to remove from this property.public OutputStreamSerializerBuilder dictionaryRemove(Object... values)
BeanContextBuilder
Removes from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove
in class SerializerBuilder
values
- The values to remove from this property.public <T> OutputStreamSerializerBuilder example(Class<T> c, T o)
BeanContextBuilder
Specifies an example of the specified class.
example
in class SerializerBuilder
c
- The POJO class.o
- An instance of the POJO class used for examples.public <T> OutputStreamSerializerBuilder exampleJson(Class<T> c, String value)
BeanContextBuilder
Specifies an example of the specified class.
exampleJson
in class SerializerBuilder
T
- The POJO class type.c
- The POJO class.value
- The simple JSON representation of the example.public OutputStreamSerializerBuilder ignoreInvocationExceptionsOnGetters(boolean value)
BeanContextBuilder
If BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnGetters
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder ignoreInvocationExceptionsOnGetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnGetters(
.
ignoreInvocationExceptionsOnGetters
in class SerializerBuilder
public OutputStreamSerializerBuilder ignoreInvocationExceptionsOnSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnSetters
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder ignoreInvocationExceptionsOnSetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnSetters(
.
ignoreInvocationExceptionsOnSetters
in class SerializerBuilder
public OutputStreamSerializerBuilder ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignorePropertiesWithoutSetters
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder ignoreUnknownBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownBeanProperties
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder ignoreUnknownBeanProperties()
BeanContextBuilder
Shortcut for calling ignoreUnknownBeanProperties(
.
ignoreUnknownBeanProperties
in class SerializerBuilder
public OutputStreamSerializerBuilder ignoreUnknownNullBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownNullBeanProperties
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder implClass(Class<?> interfaceClass, Class<?> implClass)
BeanContextBuilder
implClass
in class SerializerBuilder
interfaceClass
- The interface class.implClass
- The implementation class.public OutputStreamSerializerBuilder 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 SerializerBuilder
values
- The new value for this property.public OutputStreamSerializerBuilder locale(Locale value)
BeanContextBuilder
Specifies a default locale for serializer and parser sessions.
locale
in class SerializerBuilder
value
- The new value for this property.public OutputStreamSerializerBuilder mediaType(MediaType value)
BeanContextBuilder
Specifies a default media type value for serializer and parser sessions.
mediaType
in class SerializerBuilder
value
- The new value for this property.public OutputStreamSerializerBuilder 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 SerializerBuilder
values
- The values to add to this property.public OutputStreamSerializerBuilder 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 SerializerBuilder
values
- The values to add to this property.
public OutputStreamSerializerBuilder notBeanClassesReplace(Class<?>... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace
in class SerializerBuilder
values
- The new value for this property.public OutputStreamSerializerBuilder notBeanClassesReplace(Object... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace
in class SerializerBuilder
values
- The new value for this property.
public OutputStreamSerializerBuilder notBeanClassesRemove(Class<?>... values)
BeanContextBuilder
notBeanClassesRemove
in class SerializerBuilder
values
- The values to remove from this property.public OutputStreamSerializerBuilder notBeanClassesRemove(Object... values)
BeanContextBuilder
notBeanClassesRemove
in class SerializerBuilder
values
- The values to remove from this property.
public OutputStreamSerializerBuilder notBeanPackages(Object... values)
BeanContextBuilder
notBeanPackages
in class SerializerBuilder
values
- The values to add to this property.
public OutputStreamSerializerBuilder notBeanPackages(String... values)
BeanContextBuilder
notBeanPackages
in class SerializerBuilder
values
- The values to add to this property.public OutputStreamSerializerBuilder notBeanPackagesReplace(String... values)
BeanContextBuilder
notBeanPackagesReplace
in class SerializerBuilder
values
- public OutputStreamSerializerBuilder notBeanPackagesReplace(Object... values)
BeanContextBuilder
notBeanPackagesReplace
in class SerializerBuilder
values
- public OutputStreamSerializerBuilder notBeanPackagesRemove(String... values)
BeanContextBuilder
notBeanPackagesRemove
in class SerializerBuilder
values
- The values to remove from this property.public OutputStreamSerializerBuilder notBeanPackagesRemove(Object... values)
BeanContextBuilder
notBeanPackagesRemove
in class SerializerBuilder
values
- public OutputStreamSerializerBuilder pojoSwaps(Class<?>... values)
BeanContextBuilder
pojoSwaps
in class SerializerBuilder
values
- The values to add to this property.public OutputStreamSerializerBuilder pojoSwaps(Object... values)
BeanContextBuilder
pojoSwaps
in class SerializerBuilder
values
- The values to add to this property.
PojoSwap
.
SurrogateSwap
.
public OutputStreamSerializerBuilder pojoSwapsReplace(Class<?>... values)
BeanContextBuilder
pojoSwapsReplace
in class SerializerBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public OutputStreamSerializerBuilder pojoSwapsReplace(Object... values)
BeanContextBuilder
pojoSwapsReplace
in class SerializerBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public OutputStreamSerializerBuilder pojoSwapsRemove(Class<?>... values)
BeanContextBuilder
pojoSwapsRemove
in class SerializerBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public OutputStreamSerializerBuilder pojoSwapsRemove(Object... values)
BeanContextBuilder
pojoSwapsRemove
in class SerializerBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public OutputStreamSerializerBuilder sortProperties(boolean value)
BeanContextBuilder
When
sortProperties
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder sortProperties()
BeanContextBuilder
Shortcut for calling sortProperties(
.
sortProperties
in class SerializerBuilder
public OutputStreamSerializerBuilder timeZone(TimeZone value)
BeanContextBuilder
timeZone
in class SerializerBuilder
value
- The new value for this property.public OutputStreamSerializerBuilder useEnumNames(boolean value)
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString()
.
useEnumNames
in class SerializerBuilder
value
- The property value.public OutputStreamSerializerBuilder useEnumNames()
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString()
.
useEnumNames
in class SerializerBuilder
public OutputStreamSerializerBuilder useInterfaceProxies(boolean value)
BeanContextBuilder
If InvocationHandler
if there is no other way of instantiating them.
useInterfaceProxies
in class SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder 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 SerializerBuilder
value
- The new value for this property.
public OutputStreamSerializerBuilder useJavaBeanIntrospector()
BeanContextBuilder
Shortcut for calling useJavaBeanIntrospector(
.
useJavaBeanIntrospector
in class SerializerBuilder
public OutputStreamSerializerBuilder set(String name, Object value)
ContextBuilder
set
in class SerializerBuilder
name
- The property name.value
- The property value.PropertyStoreBuilder.set(String, Object)
public OutputStreamSerializerBuilder set(Map<String,Object> properties)
ContextBuilder
set
in class SerializerBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.set(java.util.Map)
public OutputStreamSerializerBuilder add(Map<String,Object> properties)
ContextBuilder
add
in class SerializerBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.add(java.util.Map)
public OutputStreamSerializerBuilder addTo(String name, Object value)
ContextBuilder
addTo
in class SerializerBuilder
name
- The property name.value
- The new value to add to the SET property.public OutputStreamSerializerBuilder addTo(String name, String key, Object value)
ContextBuilder
addTo
in class SerializerBuilder
name
- The property name.key
- The property value map key.value
- The property value map value.public OutputStreamSerializerBuilder removeFrom(String name, Object value)
ContextBuilder
removeFrom
in class SerializerBuilder
name
- The property name.value
- The property value in the SET property.public OutputStreamSerializerBuilder apply(PropertyStore copyFrom)
ContextBuilder
apply
in class SerializerBuilder
copyFrom
- The factory whose settings are being copied.public OutputStreamSerializerBuilder applyAnnotations(AnnotationList al, VarResolverSession vrs)
ContextBuilder
applyAnnotations
in class SerializerBuilder
al
- The list of all annotations annotated with PropertyStoreApply
.vrs
- The string resolver for resolving variables in annotation values.public OutputStreamSerializerBuilder applyAnnotations(Class<?>... fromClasses)
ContextBuilder
Applies 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 SerializerBuilder
fromClasses
- The classes on which the annotations are defined.public OutputStreamSerializerBuilder applyAnnotations(Method... fromMethods)
ContextBuilder
Applies 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 SerializerBuilder
fromMethods
- The methods on which the annotations are defined.public OutputStreamSerializer build()
ContextBuilder
build
in class SerializerBuilder
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.