public class ParserBuilder extends BeanContextBuilder
psb
Constructor and Description |
---|
ParserBuilder()
Constructor, default settings.
|
ParserBuilder(PropertyStore ps)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
ParserBuilder |
add(Map<String,Object> properties)
Adds multiple configuration properties on this object.
|
ParserBuilder |
addTo(String name,
Object value)
Adds a value to a SET or LIST property.
|
ParserBuilder |
addTo(String name,
String key,
Object value)
Adds or overwrites a value to a SET, LIST, or MAP property.
|
ParserBuilder |
apply(PropertyStore copyFrom)
Copies the settings from the specified property store into this builder.
|
ParserBuilder |
applyAnnotations(AnnotationList al,
VarResolverSession vrs)
Applies a set of annotations to this property store.
|
ParserBuilder |
applyAnnotations(Class<?> fromClass)
Applies any of the various
|
ParserBuilder |
applyAnnotations(Method fromMethod)
Applies any of the various
|
ParserBuilder |
autoCloseStreams()
Configuration property: Auto-close streams.
|
ParserBuilder |
autoCloseStreams(boolean value)
Configuration property: Auto-close streams.
|
ParserBuilder |
beanClassVisibility(Visibility value)
Configuration property: Minimum bean class visibility.
|
ParserBuilder |
beanConstructorVisibility(Visibility value)
Configuration property: Minimum bean constructor visibility.
|
ParserBuilder |
beanDictionary(Class<?>... values)
Configuration property: Bean dictionary.
|
ParserBuilder |
beanDictionary(Object... values)
Configuration property: Bean dictionary.
|
ParserBuilder |
beanDictionaryRemove(Class<?>... values)
Configuration property: Bean dictionary.
|
ParserBuilder |
beanDictionaryRemove(Object... values)
Configuration property: Bean dictionary.
|
ParserBuilder |
beanDictionaryReplace(Class<?>... values)
Configuration property: Bean dictionary.
|
ParserBuilder |
beanDictionaryReplace(Object... values)
Configuration property: Bean dictionary.
|
ParserBuilder |
beanFieldVisibility(Visibility value)
Configuration property: Minimum bean field visibility.
|
ParserBuilder |
beanFilters(Class<?>... values)
Configuration property: Bean filters.
|
ParserBuilder |
beanFilters(Object... values)
Configuration property: Bean filters.
|
ParserBuilder |
beanFiltersRemove(Class<?>... values)
Configuration property: Bean filters.
|
ParserBuilder |
beanFiltersRemove(Object... values)
Configuration property: Bean filters.
|
ParserBuilder |
beanFiltersReplace(Class<?>... values)
Configuration property: Bean filters.
|
ParserBuilder |
beanFiltersReplace(Object... values)
Configuration property: Bean filters.
|
ParserBuilder |
beanMapPutReturnsOldValue()
Configuration property: BeanMap.put() returns old property value.
|
ParserBuilder |
beanMapPutReturnsOldValue(boolean value)
Configuration property: BeanMap.put() returns old property value.
|
ParserBuilder |
beanMethodVisibility(Visibility value)
Configuration property: Minimum bean method visibility.
|
ParserBuilder |
beansRequireDefaultConstructor()
Configuration property: Beans require no-arg constructors.
|
ParserBuilder |
beansRequireDefaultConstructor(boolean value)
Configuration property: Beans require no-arg constructors.
|
ParserBuilder |
beansRequireSerializable()
Configuration property: Beans require Serializable interface.
|
ParserBuilder |
beansRequireSerializable(boolean value)
Configuration property: Beans require Serializable interface.
|
ParserBuilder |
beansRequireSettersForGetters()
Configuration property: Beans require setters for getters.
|
ParserBuilder |
beansRequireSettersForGetters(boolean value)
Configuration property: Beans require setters for getters.
|
ParserBuilder |
beansRequireSomeProperties(boolean value)
Configuration property: Beans require at least one property.
|
ParserBuilder |
beanTypePropertyName(String value)
Configuration property: Bean type property name.
|
Parser |
build()
Build the object.
|
ParserBuilder |
debug()
Configuration property: Debug mode.
|
ParserBuilder |
debugOutputLines(int value)
Configuration property: Debug output lines.
|
<T> ParserBuilder |
example(Class<T> c,
T o)
Configuration property: POJO example.
|
<T> ParserBuilder |
exampleJson(Class<T> c,
String value)
Configuration property: POJO example.
|
ParserBuilder |
ignoreInvocationExceptionsOnGetters()
Configuration property: Ignore invocation errors on getters.
|
ParserBuilder |
ignoreInvocationExceptionsOnGetters(boolean value)
Configuration property: Ignore invocation errors on getters.
|
ParserBuilder |
ignoreInvocationExceptionsOnSetters()
Configuration property: Ignore invocation errors on setters.
|
ParserBuilder |
ignoreInvocationExceptionsOnSetters(boolean value)
Configuration property: Ignore invocation errors on setters.
|
ParserBuilder |
ignorePropertiesWithoutSetters(boolean value)
Configuration property: Ignore properties without setters.
|
ParserBuilder |
ignoreUnknownBeanProperties()
Configuration property: Ignore unknown properties.
|
ParserBuilder |
ignoreUnknownBeanProperties(boolean value)
Configuration property: Ignore unknown properties.
|
ParserBuilder |
ignoreUnknownNullBeanProperties(boolean value)
Configuration property: Ignore unknown properties with null values.
|
ParserBuilder |
implClass(Class<?> interfaceClass,
Class<?> implClass)
Configuration property: Implementation classes.
|
ParserBuilder |
implClasses(Map<String,Class<?>> values)
Configuration property: Implementation classes.
|
ParserBuilder |
listener(Class<? extends ParserListener> value)
Configuration property: Parser listener.
|
ParserBuilder |
locale(Locale value)
Configuration property: Locale.
|
ParserBuilder |
mediaType(MediaType value)
Configuration property: Media type.
|
ParserBuilder |
notBeanClasses(Class<?>... values)
Configuration property: Bean class exclusions.
|
ParserBuilder |
notBeanClasses(Object... values)
Configuration property: Bean class exclusions.
|
ParserBuilder |
notBeanClassesRemove(Class<?>... values)
Configuration property: Bean class exclusions.
|
ParserBuilder |
notBeanClassesRemove(Object... values)
Configuration property: Bean class exclusions.
|
ParserBuilder |
notBeanClassesReplace(Class<?>... values)
Configuration property: Bean class exclusions.
|
ParserBuilder |
notBeanClassesReplace(Object... values)
Configuration property: Bean class exclusions.
|
ParserBuilder |
notBeanPackages(Object... values)
Configuration property: Bean package exclusions.
|
ParserBuilder |
notBeanPackages(String... values)
Configuration property: Bean package exclusions.
|
ParserBuilder |
notBeanPackagesRemove(Object... values)
Configuration property: Bean package exclusions.
|
ParserBuilder |
notBeanPackagesRemove(String... values)
Configuration property: Bean package exclusions.
|
ParserBuilder |
notBeanPackagesReplace(Object... values)
Configuration property: Bean package exclusions.
|
ParserBuilder |
notBeanPackagesReplace(String... values)
Configuration property: Bean package exclusions.
|
ParserBuilder |
pojoSwaps(Class<?>... values)
Configuration property: POJO swaps.
|
ParserBuilder |
pojoSwaps(Object... values)
Configuration property: POJO swaps.
|
ParserBuilder |
pojoSwapsRemove(Class<?>... values)
Configuration property: POJO swaps.
|
ParserBuilder |
pojoSwapsRemove(Object... values)
Configuration property: POJO swaps.
|
ParserBuilder |
pojoSwapsReplace(Class<?>... values)
Configuration property: POJO swaps.
|
ParserBuilder |
pojoSwapsReplace(Object... values)
Configuration property: POJO swaps.
|
ParserBuilder |
removeFrom(String name,
Object value)
Removes a value from a SET, LIST, or MAP property.
|
ParserBuilder |
set(Map<String,Object> properties)
Sets multiple configuration properties on this object.
|
ParserBuilder |
set(String name,
Object value)
Sets a configuration property on this object.
|
ParserBuilder |
sortProperties()
Configuration property: Sort bean properties.
|
ParserBuilder |
sortProperties(boolean value)
Configuration property: Sort bean properties.
|
ParserBuilder |
strict()
Configuration property: Strict mode.
|
ParserBuilder |
strict(boolean value)
Configuration property: Strict mode.
|
ParserBuilder |
timeZone(TimeZone value)
Configuration property: TimeZone.
|
ParserBuilder |
trimStrings()
Configuration property: Trim parsed strings.
|
ParserBuilder |
trimStrings(boolean value)
Configuration property: Trim parsed strings.
|
ParserBuilder |
unbuffered()
Configuration property: Unbuffered.
|
ParserBuilder |
unbuffered(boolean value)
Configuration property: Unbuffered.
|
ParserBuilder |
useEnumNames()
Configuration property: Use enum names.
|
ParserBuilder |
useEnumNames(boolean value)
Configuration property: Use enum names.
|
ParserBuilder |
useInterfaceProxies(boolean value)
Configuration property: Use interface proxies.
|
ParserBuilder |
useJavaBeanIntrospector()
Configuration property: Use Java Introspector.
|
ParserBuilder |
useJavaBeanIntrospector(boolean value)
Configuration property: Use Java Introspector.
|
debug, examples, excludeProperties, excludeProperties, excludeProperties, fluentSetters, fluentSetters, includeProperties, includeProperties, includeProperties, propertyNamer
build, getPropertyStore, getPropertyStoreBuilder, peek, peek
public ParserBuilder()
public ParserBuilder(PropertyStore ps)
ps
- The initial configuration settings for this builder.public ParserBuilder autoCloseStreams(boolean value)
If
value
- The new value for this property.
public ParserBuilder autoCloseStreams()
Shortcut for calling autoCloseStreams(
.
public ParserBuilder debugOutputLines(int value)
When parse errors occur, this specifies the number of lines of input before and after the error location to be printed as part of the exception message.
value
- The new value for this property.
public ParserBuilder listener(Class<? extends ParserListener> value)
Class used to listen for errors and warnings that occur during parsing.
value
- The new value for this property.public ParserBuilder strict(boolean value)
If
value
- The new value for this property.
public ParserBuilder strict()
Shortcut for calling strict(
.
public ParserBuilder trimStrings(boolean value)
If String.trim()
before being added to
the POJO.
value
- The new value for this property.
public ParserBuilder trimStrings()
Shortcut for calling trimStrings(
.
public ParserBuilder unbuffered(boolean value)
If
value
- The new value for this property.
public ParserBuilder unbuffered()
Shortcut for calling unbuffered(
.
public ParserBuilder 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 BeanContextBuilder
value
- The new value for this property.
Visibility.PUBLIC
.public ParserBuilder 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 ParserBuilder 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 ParserBuilder 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 ParserBuilder beanDictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
beanDictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.public ParserBuilder beanDictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
beanDictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.public ParserBuilder beanDictionaryRemove(Class<?>... 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 ParserBuilder 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 ParserBuilder 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 ParserBuilder 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 ParserBuilder 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 ParserBuilder beanFiltersReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but replaces the existing values.
beanFiltersReplace
in class BeanContextBuilder
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 ParserBuilder beanFiltersReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanFilters(Object...)
but replaces the existing values.
beanFiltersReplace
in class BeanContextBuilder
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 ParserBuilder beanFiltersRemove(Class<?>... 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 ParserBuilder 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 ParserBuilder 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 ParserBuilder beanMapPutReturnsOldValue()
BeanContextBuilder
Shortcut for calling beanMapPutReturnsOldValue(
.
beanMapPutReturnsOldValue
in class BeanContextBuilder
public ParserBuilder 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 ParserBuilder 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 ParserBuilder beansRequireDefaultConstructor()
BeanContextBuilder
Shortcut for calling beansRequireDefaultConstructor(
.
beansRequireDefaultConstructor
in class BeanContextBuilder
public ParserBuilder 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 ParserBuilder beansRequireSerializable()
BeanContextBuilder
Shortcut for calling beansRequireSerializable(
.
beansRequireSerializable
in class BeanContextBuilder
public ParserBuilder beansRequireSettersForGetters(boolean value)
BeanContextBuilder
If
Otherwise, they will be ignored.
beansRequireSettersForGetters
in class BeanContextBuilder
value
- The new value for this property.
public ParserBuilder beansRequireSettersForGetters()
BeanContextBuilder
Shortcut for calling beansRequireSettersForGetters(
.
beansRequireSettersForGetters
in class BeanContextBuilder
public ParserBuilder 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 ParserBuilder 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 ParserBuilder debug()
BeanContextBuilder
Shortcut for calling debug(
.
debug
in class BeanContextBuilder
public <T> ParserBuilder example(Class<T> c, T o)
BeanContextBuilder
Specifies an example of the specified class.
example
in class BeanContextBuilder
c
- The POJO class.o
- An instance of the POJO class used for examples.public <T> ParserBuilder exampleJson(Class<T> c, String value)
BeanContextBuilder
Specifies an example of the specified class.
exampleJson
in class BeanContextBuilder
T
- The POJO class type.c
- The POJO class.value
- The simple JSON representation of the example.public ParserBuilder ignoreInvocationExceptionsOnGetters(boolean value)
BeanContextBuilder
If BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
value
- The new value for this property.
public ParserBuilder ignoreInvocationExceptionsOnGetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnGetters(
.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
public ParserBuilder ignoreInvocationExceptionsOnSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
value
- The new value for this property.
public ParserBuilder ignoreInvocationExceptionsOnSetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnSetters(
.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
public ParserBuilder ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignorePropertiesWithoutSetters
in class BeanContextBuilder
value
- The new value for this property.
public ParserBuilder ignoreUnknownBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownBeanProperties
in class BeanContextBuilder
value
- The new value for this property.
public ParserBuilder ignoreUnknownBeanProperties()
BeanContextBuilder
Shortcut for calling ignoreUnknownBeanProperties(
.
ignoreUnknownBeanProperties
in class BeanContextBuilder
public ParserBuilder ignoreUnknownNullBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownNullBeanProperties
in class BeanContextBuilder
value
- The new value for this property.
public ParserBuilder implClass(Class<?> interfaceClass, Class<?> implClass)
BeanContextBuilder
implClass
in class BeanContextBuilder
interfaceClass
- The interface class.implClass
- The implementation class.public ParserBuilder 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 ParserBuilder 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 ParserBuilder 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 ParserBuilder 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 BeanContextBuilder
values
- The values to add to this property.public ParserBuilder 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 BeanContextBuilder
values
- The values to add to this property.
public ParserBuilder notBeanClassesReplace(Class<?>... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace
in class BeanContextBuilder
values
- The new value for this property.public ParserBuilder notBeanClassesReplace(Object... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace
in class BeanContextBuilder
values
- The new value for this property.
public ParserBuilder notBeanClassesRemove(Class<?>... values)
BeanContextBuilder
notBeanClassesRemove
in class BeanContextBuilder
values
- The values to remove from this property.public ParserBuilder notBeanClassesRemove(Object... values)
BeanContextBuilder
notBeanClassesRemove
in class BeanContextBuilder
values
- The values to remove from this property.
public ParserBuilder notBeanPackages(Object... values)
BeanContextBuilder
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.
public ParserBuilder notBeanPackages(String... values)
BeanContextBuilder
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.public ParserBuilder notBeanPackagesReplace(String... values)
BeanContextBuilder
notBeanPackagesReplace
in class BeanContextBuilder
values
- public ParserBuilder notBeanPackagesReplace(Object... values)
BeanContextBuilder
notBeanPackagesReplace
in class BeanContextBuilder
values
- public ParserBuilder notBeanPackagesRemove(String... values)
BeanContextBuilder
notBeanPackagesRemove
in class BeanContextBuilder
values
- The values to remove from this property.public ParserBuilder notBeanPackagesRemove(Object... values)
BeanContextBuilder
notBeanPackagesRemove
in class BeanContextBuilder
values
- public ParserBuilder pojoSwaps(Class<?>... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.public ParserBuilder pojoSwaps(Object... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.
PojoSwap
.
SurrogateSwap
.
public ParserBuilder pojoSwapsReplace(Class<?>... values)
BeanContextBuilder
pojoSwapsReplace
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public ParserBuilder pojoSwapsReplace(Object... values)
BeanContextBuilder
pojoSwapsReplace
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public ParserBuilder pojoSwapsRemove(Class<?>... values)
BeanContextBuilder
pojoSwapsRemove
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public ParserBuilder pojoSwapsRemove(Object... values)
BeanContextBuilder
pojoSwapsRemove
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public ParserBuilder sortProperties(boolean value)
BeanContextBuilder
When
sortProperties
in class BeanContextBuilder
value
- The new value for this property.
public ParserBuilder sortProperties()
BeanContextBuilder
Shortcut for calling sortProperties(
.
sortProperties
in class BeanContextBuilder
public ParserBuilder timeZone(TimeZone value)
BeanContextBuilder
timeZone
in class BeanContextBuilder
value
- The new value for this property.public ParserBuilder useEnumNames(boolean value)
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString()
.
useEnumNames
in class BeanContextBuilder
value
- The property value.public ParserBuilder useEnumNames()
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString()
.
useEnumNames
in class BeanContextBuilder
public ParserBuilder 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 ParserBuilder 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 ParserBuilder useJavaBeanIntrospector()
BeanContextBuilder
Shortcut for calling useJavaBeanIntrospector(
.
useJavaBeanIntrospector
in class BeanContextBuilder
public ParserBuilder set(String name, Object value)
ContextBuilder
set
in class BeanContextBuilder
name
- The property name.value
- The property value.PropertyStoreBuilder.set(String, Object)
public ParserBuilder set(Map<String,Object> properties)
ContextBuilder
set
in class BeanContextBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.set(java.util.Map)
public ParserBuilder add(Map<String,Object> properties)
ContextBuilder
add
in class BeanContextBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.add(java.util.Map)
public ParserBuilder 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 ParserBuilder 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 ParserBuilder removeFrom(String name, Object value)
ContextBuilder
removeFrom
in class BeanContextBuilder
name
- The property name.value
- The property value in the SET property.public ParserBuilder apply(PropertyStore copyFrom)
ContextBuilder
apply
in class BeanContextBuilder
copyFrom
- The factory whose settings are being copied.public ParserBuilder applyAnnotations(AnnotationList al, VarResolverSession vrs)
ContextBuilder
applyAnnotations
in class BeanContextBuilder
al
- The list of all annotations annotated with PropertyStoreApply
.vrs
- The string resolver for resolving variables in annotation values.public ParserBuilder applyAnnotations(Class<?> fromClass)
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 BeanContextBuilder
fromClass
- The class on which the annotations are defined.public ParserBuilder applyAnnotations(Method fromMethod)
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 BeanContextBuilder
fromMethod
- The method on which the annotations are defined.public Parser build()
ContextBuilder
build
in class BeanContextBuilder
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.