public class BeanTraverseBuilder extends BeanContextBuilder
psb
Constructor and Description |
---|
BeanTraverseBuilder()
Constructor, default settings.
|
BeanTraverseBuilder(PropertyStore ps)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BeanTraverseBuilder |
add(Map<String,Object> properties)
Adds multiple configuration properties on this object.
|
BeanTraverseBuilder |
addTo(String name,
Object value)
Adds a value to a SET or LIST property.
|
BeanTraverseBuilder |
addTo(String name,
String key,
Object value)
Adds or overwrites a value to a SET, LIST, or MAP property.
|
BeanTraverseBuilder |
annotations(Annotation... values)
Configuration property: Annotations.
|
BeanTraverseBuilder |
apply(PropertyStore copyFrom)
Copies the settings from the specified property store into this builder.
|
BeanTraverseBuilder |
applyAnnotations(AnnotationList al,
VarResolverSession vrs)
Applies a set of annotations to this property store.
|
BeanTraverseBuilder |
applyAnnotations(Class<?>... fromClasses)
Applies any of the various
|
BeanTraverseBuilder |
applyAnnotations(Method... fromMethods)
Applies any of the various
|
BeanTraverseBuilder |
beanClassVisibility(Visibility value)
Configuration property: Minimum bean class visibility.
|
BeanTraverseBuilder |
beanConstructorVisibility(Visibility value)
Configuration property: Minimum bean constructor visibility.
|
BeanTraverseBuilder |
beanDictionary(Class<?>... values)
Deprecated.
|
BeanTraverseBuilder |
beanDictionary(Object... values)
Deprecated.
|
BeanTraverseBuilder |
beanDictionaryRemove(Class<?>... values)
Deprecated.
|
BeanTraverseBuilder |
beanDictionaryRemove(Object... values)
Deprecated.
|
BeanTraverseBuilder |
beanDictionaryReplace(Class<?>... values)
Deprecated.
|
BeanTraverseBuilder |
beanDictionaryReplace(Object... values)
Deprecated.
|
BeanTraverseBuilder |
beanFieldVisibility(Visibility value)
Configuration property: Minimum bean field visibility.
|
BeanTraverseBuilder |
beanFilters(Class<?>... values)
Configuration property: Bean filters.
|
BeanTraverseBuilder |
beanFilters(Object... values)
Configuration property: Bean filters.
|
BeanTraverseBuilder |
beanFiltersRemove(Class<?>... values)
Configuration property: Bean filters.
|
BeanTraverseBuilder |
beanFiltersRemove(Object... values)
Configuration property: Bean filters.
|
BeanTraverseBuilder |
beanFiltersReplace(Class<?>... values)
Configuration property: Bean filters.
|
BeanTraverseBuilder |
beanFiltersReplace(Object... values)
Configuration property: Bean filters.
|
BeanTraverseBuilder |
beanMapPutReturnsOldValue()
Configuration property: BeanMap.put() returns old property value.
|
BeanTraverseBuilder |
beanMapPutReturnsOldValue(boolean value)
Configuration property: BeanMap.put() returns old property value.
|
BeanTraverseBuilder |
beanMethodVisibility(Visibility value)
Configuration property: Minimum bean method visibility.
|
BeanTraverseBuilder |
beansRequireDefaultConstructor()
Configuration property: Beans require no-arg constructors.
|
BeanTraverseBuilder |
beansRequireDefaultConstructor(boolean value)
Configuration property: Beans require no-arg constructors.
|
BeanTraverseBuilder |
beansRequireSerializable()
Configuration property: Beans require Serializable interface.
|
BeanTraverseBuilder |
beansRequireSerializable(boolean value)
Configuration property: Beans require Serializable interface.
|
BeanTraverseBuilder |
beansRequireSettersForGetters()
Configuration property: Beans require setters for getters.
|
BeanTraverseBuilder |
beansRequireSettersForGetters(boolean value)
Configuration property: Beans require setters for getters.
|
BeanTraverseBuilder |
beansRequireSomeProperties(boolean value)
Configuration property: Beans require at least one property.
|
BeanTraverseBuilder |
beanTypePropertyName(String value)
Configuration property: Bean type property name.
|
BeanTraverseBuilder |
bpi(Class<?> beanClass,
String value)
Configuration property: Bean property includes.
|
BeanTraverseBuilder |
bpi(Map<String,String> values)
Configuration property: Bean property includes.
|
BeanTraverseBuilder |
bpi(String beanClassName,
String value)
Configuration property: Bean property includes.
|
BeanTraverseBuilder |
bpro(Class<?> beanClass,
String value)
Configuration property: Read-only bean properties.
|
BeanTraverseBuilder |
bpro(Map<String,String> values)
Configuration property: Read-only bean properties.
|
BeanTraverseBuilder |
bpro(String beanClassName,
String value)
Configuration property: Read-only bean properties.
|
BeanTraverseBuilder |
bpwo(Class<?> beanClass,
String properties)
Configuration property: Write-only bean properties.
|
BeanTraverseBuilder |
bpwo(Map<String,String> values)
Configuration property: Write-only bean properties.
|
BeanTraverseBuilder |
bpwo(String beanClassName,
String value)
Configuration property: Write-only bean properties.
|
BeanTraverseBuilder |
bpx(Class<?> beanClass,
String properties)
Configuration property: Bean property excludes.
|
BeanTraverseBuilder |
bpx(Map<String,String> values)
Configuration property: Bean property excludes.
|
BeanTraverseBuilder |
bpx(String beanClassName,
String value)
Configuration property: Bean property excludes.
|
BeanTraverseContext |
build()
Build the object.
|
BeanTraverseBuilder |
debug()
Configuration property: Debug mode.
|
BeanTraverseBuilder |
detectRecursions()
Configuration property: Automatically detect POJO recursions.
|
BeanTraverseBuilder |
detectRecursions(boolean value)
Configuration property: Automatically detect POJO recursions.
|
BeanTraverseBuilder |
dictionary(Class<?>... values)
Configuration property: Bean dictionary.
|
BeanTraverseBuilder |
dictionary(Object... values)
Configuration property: Bean dictionary.
|
BeanTraverseBuilder |
dictionaryRemove(Class<?>... values)
Configuration property: Bean dictionary.
|
BeanTraverseBuilder |
dictionaryRemove(Object... values)
Configuration property: Bean dictionary.
|
BeanTraverseBuilder |
dictionaryReplace(Class<?>... values)
Configuration property: Bean dictionary.
|
BeanTraverseBuilder |
dictionaryReplace(Object... values)
Configuration property: Bean dictionary.
|
<T> BeanTraverseBuilder |
example(Class<T> c,
T o)
Configuration property: POJO example.
|
<T> BeanTraverseBuilder |
exampleJson(Class<T> c,
String value)
Configuration property: POJO example.
|
BeanTraverseBuilder |
ignoreInvocationExceptionsOnGetters()
Configuration property: Ignore invocation errors on getters.
|
BeanTraverseBuilder |
ignoreInvocationExceptionsOnGetters(boolean value)
Configuration property: Ignore invocation errors on getters.
|
BeanTraverseBuilder |
ignoreInvocationExceptionsOnSetters()
Configuration property: Ignore invocation errors on setters.
|
BeanTraverseBuilder |
ignoreInvocationExceptionsOnSetters(boolean value)
Configuration property: Ignore invocation errors on setters.
|
BeanTraverseBuilder |
ignorePropertiesWithoutSetters(boolean value)
Configuration property: Ignore properties without setters.
|
BeanTraverseBuilder |
ignoreRecursions()
Configuration property: Ignore recursion errors.
|
BeanTraverseBuilder |
ignoreRecursions(boolean value)
Configuration property: Ignore recursion errors.
|
BeanTraverseBuilder |
ignoreUnknownBeanProperties()
Configuration property: Ignore unknown properties.
|
BeanTraverseBuilder |
ignoreUnknownBeanProperties(boolean value)
Configuration property: Ignore unknown properties.
|
BeanTraverseBuilder |
ignoreUnknownNullBeanProperties(boolean value)
Configuration property: Ignore unknown properties with null values.
|
BeanTraverseBuilder |
implClass(Class<?> interfaceClass,
Class<?> implClass)
Configuration property: Implementation classes.
|
BeanTraverseBuilder |
implClasses(Map<String,Class<?>> values)
Configuration property: Implementation classes.
|
BeanTraverseBuilder |
initialDepth(int value)
Configuration property: Initial depth.
|
BeanTraverseBuilder |
locale(Locale value)
Configuration property: Locale.
|
BeanTraverseBuilder |
maxDepth(int value)
Configuration property: Max traversal depth.
|
BeanTraverseBuilder |
mediaType(MediaType value)
Configuration property: Media type.
|
BeanTraverseBuilder |
notBeanClasses(Class<?>... values)
Configuration property: Bean class exclusions.
|
BeanTraverseBuilder |
notBeanClasses(Object... values)
Configuration property: Bean class exclusions.
|
BeanTraverseBuilder |
notBeanClassesRemove(Class<?>... values)
Configuration property: Bean class exclusions.
|
BeanTraverseBuilder |
notBeanClassesRemove(Object... values)
Configuration property: Bean class exclusions.
|
BeanTraverseBuilder |
notBeanClassesReplace(Class<?>... values)
Configuration property: Bean class exclusions.
|
BeanTraverseBuilder |
notBeanClassesReplace(Object... values)
Configuration property: Bean class exclusions.
|
BeanTraverseBuilder |
notBeanPackages(Object... values)
Configuration property: Bean package exclusions.
|
BeanTraverseBuilder |
notBeanPackages(String... values)
Configuration property: Bean package exclusions.
|
BeanTraverseBuilder |
notBeanPackagesRemove(Object... values)
Configuration property: Bean package exclusions.
|
BeanTraverseBuilder |
notBeanPackagesRemove(String... values)
Configuration property: Bean package exclusions.
|
BeanTraverseBuilder |
notBeanPackagesReplace(Object... values)
Configuration property: Bean package exclusions.
|
BeanTraverseBuilder |
notBeanPackagesReplace(String... values)
Configuration property: Bean package exclusions.
|
BeanTraverseBuilder |
pojoSwaps(Class<?>... values)
Configuration property: POJO swaps.
|
BeanTraverseBuilder |
pojoSwaps(Object... values)
Configuration property: POJO swaps.
|
BeanTraverseBuilder |
pojoSwapsRemove(Class<?>... values)
Configuration property: POJO swaps.
|
BeanTraverseBuilder |
pojoSwapsRemove(Object... values)
Configuration property: POJO swaps.
|
BeanTraverseBuilder |
pojoSwapsReplace(Class<?>... values)
Configuration property: POJO swaps.
|
BeanTraverseBuilder |
pojoSwapsReplace(Object... values)
Configuration property: POJO swaps.
|
BeanTraverseBuilder |
removeFrom(String name,
Object value)
Removes a value from a SET, LIST, or MAP property.
|
BeanTraverseBuilder |
set(Map<String,Object> properties)
Sets multiple configuration properties on this object.
|
BeanTraverseBuilder |
set(String name,
Object value)
Sets a configuration property on this object.
|
BeanTraverseBuilder |
sortProperties()
Configuration property: Sort bean properties.
|
BeanTraverseBuilder |
sortProperties(boolean value)
Configuration property: Sort bean properties.
|
BeanTraverseBuilder |
timeZone(TimeZone value)
Configuration property: TimeZone.
|
BeanTraverseBuilder |
useEnumNames()
Configuration property: Use enum names.
|
BeanTraverseBuilder |
useEnumNames(boolean value)
Configuration property: Use enum names.
|
BeanTraverseBuilder |
useInterfaceProxies(boolean value)
Configuration property: Use interface proxies.
|
BeanTraverseBuilder |
useJavaBeanIntrospector()
Configuration property: Use Java Introspector.
|
BeanTraverseBuilder |
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 BeanTraverseBuilder()
public BeanTraverseBuilder(PropertyStore ps)
ps
- The initial configuration settings for this builder.public BeanTraverseBuilder detectRecursions(boolean value)
Specifies that recursions should be checked for during traversal.
value
- The new value for this property.
public BeanTraverseBuilder detectRecursions()
Shortcut for calling detectRecursions(
.
public BeanTraverseBuilder ignoreRecursions(boolean value)
If
value
- The new value for this property.
public BeanTraverseBuilder ignoreRecursions()
Shortcut for calling ignoreRecursions(
.
public BeanTraverseBuilder initialDepth(int value)
The initial indentation level at the root.
value
- The new value for this property.
public BeanTraverseBuilder maxDepth(int value)
Abort traversal if specified depth is reached in the POJO tree.
If this depth is exceeded, an exception is thrown.
This prevents stack overflows from occurring when trying to traverse models with recursive references.
value
- The new value for this property.
public BeanTraverseBuilder 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 BeanContextBuilder
values
- The values to add to this property.public BeanTraverseBuilder 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 BeanTraverseBuilder 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
.@Deprecated public BeanTraverseBuilder beanDictionary(Class<?>... values)
BeanContextBuilder
BeanContextBuilder.dictionary(Class...)
Same as BeanContextBuilder.beanDictionary(Object...)
but takes in an array of classes.
beanDictionary
in class BeanContextBuilder
values
- The values to add to this property.@Deprecated public BeanTraverseBuilder 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 BeanContextBuilder
values
- The values to add to this property.@Deprecated public BeanTraverseBuilder beanDictionaryReplace(Class<?>... values)
BeanContextBuilder
BeanContextBuilder.dictionaryReplace(Class...)
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
beanDictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.@Deprecated public BeanTraverseBuilder beanDictionaryReplace(Object... values)
BeanContextBuilder
BeanContextBuilder.dictionaryReplace(Object...)
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
beanDictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.@Deprecated public BeanTraverseBuilder 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 BeanContextBuilder
values
- The values to remove from this property.@Deprecated public BeanTraverseBuilder 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 BeanContextBuilder
values
- The values to remove from this property.public BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder beanMapPutReturnsOldValue()
BeanContextBuilder
Shortcut for calling beanMapPutReturnsOldValue(
.
beanMapPutReturnsOldValue
in class BeanContextBuilder
public BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder beansRequireDefaultConstructor()
BeanContextBuilder
Shortcut for calling beansRequireDefaultConstructor(
.
beansRequireDefaultConstructor
in class BeanContextBuilder
public BeanTraverseBuilder 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 BeanTraverseBuilder beansRequireSerializable()
BeanContextBuilder
Shortcut for calling beansRequireSerializable(
.
beansRequireSerializable
in class BeanContextBuilder
public BeanTraverseBuilder beansRequireSettersForGetters(boolean value)
BeanContextBuilder
If
Otherwise, they will be ignored.
beansRequireSettersForGetters
in class BeanContextBuilder
value
- The new value for this property.
public BeanTraverseBuilder beansRequireSettersForGetters()
BeanContextBuilder
Shortcut for calling beansRequireSettersForGetters(
.
beansRequireSettersForGetters
in class BeanContextBuilder
public BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder bpi(Class<?> beanClass, String value)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class BeanContextBuilder
beanClass
- The bean class.value
- Comma-delimited list of property names.public BeanTraverseBuilder bpi(Map<String,String> values)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class BeanContextBuilder
values
- The new value for this property.public BeanTraverseBuilder bpi(String beanClassName, String value)
BeanContextBuilder
Specifies the set and order of names of properties associated with the bean class.
bpi
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public BeanTraverseBuilder bpx(Class<?> beanClass, String properties)
BeanContextBuilder
Specifies to exclude the specified list of properties for the specified bean class.
bpx
in class BeanContextBuilder
beanClass
- The bean class.properties
- Comma-delimited list of property names.public BeanTraverseBuilder bpx(Map<String,String> values)
BeanContextBuilder
Specifies to exclude the specified list of properties for the specified bean classes.
bpx
in class BeanContextBuilder
values
- The new value for this property.public BeanTraverseBuilder bpx(String beanClassName, String value)
BeanContextBuilder
bpx
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public BeanTraverseBuilder bpro(Class<?> beanClass, String value)
BeanContextBuilder
Specifies the read-only properties for the specified bean class.
bpro
in class BeanContextBuilder
beanClass
- The bean class.value
- Comma-delimited list of property names.public BeanTraverseBuilder bpro(Map<String,String> values)
BeanContextBuilder
Specifies the read-only properties for the specified bean classes.
bpro
in class BeanContextBuilder
values
- The new value for this property.public BeanTraverseBuilder bpro(String beanClassName, String value)
BeanContextBuilder
Specifies the read-only properties for the specified bean class.
bpro
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public BeanTraverseBuilder bpwo(Class<?> beanClass, String properties)
BeanContextBuilder
Specifies the write-only properties for the specified bean class.
bpwo
in class BeanContextBuilder
beanClass
- The bean class.properties
- Comma-delimited list of property names.public BeanTraverseBuilder bpwo(Map<String,String> values)
BeanContextBuilder
Specifies the write-only properties for the specified bean classes.
bpwo
in class BeanContextBuilder
values
- The new value for this property.public BeanTraverseBuilder bpwo(String beanClassName, String value)
BeanContextBuilder
Specifies the write-only properties for the specified bean class.
bpwo
in class BeanContextBuilder
beanClassName
- The bean class name.
value
- Comma-delimited list of property names.public BeanTraverseBuilder debug()
BeanContextBuilder
Shortcut for calling debug(
.
debug
in class BeanContextBuilder
public BeanTraverseBuilder dictionary(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but takes in an array of classes.
dictionary
in class BeanContextBuilder
values
- The values to add to this property.public BeanTraverseBuilder dictionary(Object... values)
BeanContextBuilder
Adds to the list of classes that make up the bean dictionary in this bean context.
dictionary
in class BeanContextBuilder
values
- The values to add to this property.public BeanTraverseBuilder dictionaryReplace(Class<?>... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
dictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.public BeanTraverseBuilder dictionaryReplace(Object... values)
BeanContextBuilder
Same as BeanContextBuilder.beanDictionary(Object...)
but replaces the existing value.
dictionaryReplace
in class BeanContextBuilder
values
- The new values for this property.public BeanTraverseBuilder dictionaryRemove(Class<?>... values)
BeanContextBuilder
Removes from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove
in class BeanContextBuilder
values
- The values to remove from this property.public BeanTraverseBuilder dictionaryRemove(Object... values)
BeanContextBuilder
Removes from the list of classes that make up the bean dictionary in this bean context.
dictionaryRemove
in class BeanContextBuilder
values
- The values to remove from this property.public <T> BeanTraverseBuilder 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> BeanTraverseBuilder 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 BeanTraverseBuilder ignoreInvocationExceptionsOnGetters(boolean value)
BeanContextBuilder
If BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
value
- The new value for this property.
public BeanTraverseBuilder ignoreInvocationExceptionsOnGetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnGetters(
.
ignoreInvocationExceptionsOnGetters
in class BeanContextBuilder
public BeanTraverseBuilder ignoreInvocationExceptionsOnSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
value
- The new value for this property.
public BeanTraverseBuilder ignoreInvocationExceptionsOnSetters()
BeanContextBuilder
Shortcut for calling ignoreInvocationExceptionsOnSetters(
.
ignoreInvocationExceptionsOnSetters
in class BeanContextBuilder
public BeanTraverseBuilder ignorePropertiesWithoutSetters(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignorePropertiesWithoutSetters
in class BeanContextBuilder
value
- The new value for this property.
public BeanTraverseBuilder ignoreUnknownBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownBeanProperties
in class BeanContextBuilder
value
- The new value for this property.
public BeanTraverseBuilder ignoreUnknownBeanProperties()
BeanContextBuilder
Shortcut for calling ignoreUnknownBeanProperties(
.
ignoreUnknownBeanProperties
in class BeanContextBuilder
public BeanTraverseBuilder ignoreUnknownNullBeanProperties(boolean value)
BeanContextBuilder
If
Otherwise, a BeanRuntimeException
is thrown.
ignoreUnknownNullBeanProperties
in class BeanContextBuilder
value
- The new value for this property.
public BeanTraverseBuilder implClass(Class<?> interfaceClass, Class<?> implClass)
BeanContextBuilder
implClass
in class BeanContextBuilder
interfaceClass
- The interface class.implClass
- The implementation class.public BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder notBeanClassesReplace(Class<?>... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace
in class BeanContextBuilder
values
- The new value for this property.public BeanTraverseBuilder notBeanClassesReplace(Object... values)
BeanContextBuilder
Not-bean classes are converted to
notBeanClassesReplace
in class BeanContextBuilder
values
- The new value for this property.
public BeanTraverseBuilder notBeanClassesRemove(Class<?>... values)
BeanContextBuilder
notBeanClassesRemove
in class BeanContextBuilder
values
- The values to remove from this property.public BeanTraverseBuilder notBeanClassesRemove(Object... values)
BeanContextBuilder
notBeanClassesRemove
in class BeanContextBuilder
values
- The values to remove from this property.
public BeanTraverseBuilder notBeanPackages(Object... values)
BeanContextBuilder
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.
public BeanTraverseBuilder notBeanPackages(String... values)
BeanContextBuilder
notBeanPackages
in class BeanContextBuilder
values
- The values to add to this property.public BeanTraverseBuilder notBeanPackagesReplace(String... values)
BeanContextBuilder
notBeanPackagesReplace
in class BeanContextBuilder
values
- public BeanTraverseBuilder notBeanPackagesReplace(Object... values)
BeanContextBuilder
notBeanPackagesReplace
in class BeanContextBuilder
values
- public BeanTraverseBuilder notBeanPackagesRemove(String... values)
BeanContextBuilder
notBeanPackagesRemove
in class BeanContextBuilder
values
- The values to remove from this property.public BeanTraverseBuilder notBeanPackagesRemove(Object... values)
BeanContextBuilder
notBeanPackagesRemove
in class BeanContextBuilder
values
- public BeanTraverseBuilder pojoSwaps(Class<?>... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.public BeanTraverseBuilder pojoSwaps(Object... values)
BeanContextBuilder
pojoSwaps
in class BeanContextBuilder
values
- The values to add to this property.
PojoSwap
.
SurrogateSwap
.
public BeanTraverseBuilder pojoSwapsReplace(Class<?>... values)
BeanContextBuilder
pojoSwapsReplace
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public BeanTraverseBuilder pojoSwapsReplace(Object... values)
BeanContextBuilder
pojoSwapsReplace
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public BeanTraverseBuilder pojoSwapsRemove(Class<?>... values)
BeanContextBuilder
pojoSwapsRemove
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public BeanTraverseBuilder pojoSwapsRemove(Object... values)
BeanContextBuilder
pojoSwapsRemove
in class BeanContextBuilder
values
- The values to remove from this property.
PojoSwap
.
SurrogateSwap
.
public BeanTraverseBuilder sortProperties(boolean value)
BeanContextBuilder
When
sortProperties
in class BeanContextBuilder
value
- The new value for this property.
public BeanTraverseBuilder sortProperties()
BeanContextBuilder
Shortcut for calling sortProperties(
.
sortProperties
in class BeanContextBuilder
public BeanTraverseBuilder timeZone(TimeZone value)
BeanContextBuilder
timeZone
in class BeanContextBuilder
value
- The new value for this property.public BeanTraverseBuilder 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 BeanTraverseBuilder useEnumNames()
BeanContextBuilder
When enabled, enums are always serialized by name instead of using Object.toString()
.
useEnumNames
in class BeanContextBuilder
public BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder useJavaBeanIntrospector()
BeanContextBuilder
Shortcut for calling useJavaBeanIntrospector(
.
useJavaBeanIntrospector
in class BeanContextBuilder
public BeanTraverseBuilder set(String name, Object value)
ContextBuilder
set
in class BeanContextBuilder
name
- The property name.value
- The property value.PropertyStoreBuilder.set(String, Object)
public BeanTraverseBuilder set(Map<String,Object> properties)
ContextBuilder
set
in class BeanContextBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.set(java.util.Map)
public BeanTraverseBuilder add(Map<String,Object> properties)
ContextBuilder
add
in class BeanContextBuilder
properties
- The properties to set on this class.PropertyStoreBuilder.add(java.util.Map)
public BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanTraverseBuilder removeFrom(String name, Object value)
ContextBuilder
removeFrom
in class BeanContextBuilder
name
- The property name.value
- The property value in the SET property.public BeanTraverseBuilder apply(PropertyStore copyFrom)
ContextBuilder
apply
in class BeanContextBuilder
copyFrom
- The factory whose settings are being copied.public BeanTraverseBuilder 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 BeanTraverseBuilder 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 BeanContextBuilder
fromClasses
- The classes on which the annotations are defined.public BeanTraverseBuilder 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 BeanContextBuilder
fromMethods
- The methods on which the annotations are defined.public BeanTraverseContext build()
ContextBuilder
build
in class BeanContextBuilder
Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.