Class MarshalledFilter.Builder
- Enclosing class:
- MarshalledFilter
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder(ClassInfoTyped<?> beanClass) Constructor for bean filters. -
Method Summary
Modifier and TypeMethodDescriptionapplyAnnotations(List<Marshalled> annotations) Applies the information in the specified list of@Marshalledannotations to this filter.applyBeanTypeAnnotations(List<BeanType> annotations) Applies the information in the specified list of@BeanTypeannotations to this filter.build()Creates aMarshalledFilterwith settings in this builder class.dictionary(Class<?>... values) Bean dictionary.dictionary(ClassInfo... values) Bean dictionary.Example.excludeProperties(String... value) Bean property excludes.Find fluent setters.Bean implementation class.Implementation class.interceptor(Class<?> value) Bean interceptor.interceptor(ClassInfo value) Bean interceptor.interfaceClass(Class<?> value) Bean interface class.interfaceClass(ClassInfo value) Interface class.properties(String... value) Bean property includes.propertyNamer(Class<? extends PropertyNamer> value) Bean property namer.propertyNamer(ClassInfoTyped<? extends PropertyNamer> value) Bean property namer.readOnlyProperties(String... value) Read-only bean properties.Bean stop class.Stop class.Bean dictionary type name.Opt out of alphabetical property sorting for this specific bean.unsortedProperties(boolean value) Opt out of alphabetical property sorting for this specific bean.writeOnlyProperties(String... value) Write-only bean properties.
-
Constructor Details
-
Builder
Constructor for bean filters.- Parameters:
beanClass- The bean class that this filter applies to.
-
-
Method Details
-
applyAnnotations
Applies the information in the specified list of@Marshalledannotations to this filter.- Parameters:
annotations- The annotations to apply. Must not benull .- Returns:
- This object.
-
applyBeanTypeAnnotations
Applies the information in the specified list of@BeanTypeannotations to this filter.Carries the bean-modeling attributes (property lists, ordering, fluent setters, stop class, etc.) that used to live on
@Marshalledbefore the bean-layer split.- Parameters:
annotations- The annotations to apply. Must not benull .- Returns:
- This object.
-
build
Creates aMarshalledFilterwith settings in this builder class.- Returns:
- A new
MarshalledFilterinstance.
-
dictionary
Bean dictionary.Adds to the list of classes that make up the bean dictionary for this bean.
See Also:
- Parameters:
values- The values to add to this property.- Returns:
- This object.
-
dictionary
Bean dictionary.Same as the other dictionary method but accepts
ClassInfoobjects directly instead ofClassobjects.- Parameters:
values- The class info objects to add to this property.- Returns:
- This object.
-
example
Example.- Parameters:
value- The new value for this property.- Returns:
- This object.
-
excludeProperties
Bean property excludes.Specifies properties to exclude from the bean class.
See Also:
- Parameters:
value- The new value for this setting.
Values can contain comma-delimited list of property names.- Returns:
- This object.
-
findFluentSetters
Find fluent setters.When enabled, fluent setters are detected on beans.
See Also:
- Returns:
- This object.
-
implClass
Bean implementation class.- Parameters:
value- The new value for this setting. Can benull to clear any previously-set implementation class.- Returns:
- This object.
-
implClass
Implementation class.Same as the other implClass method but accepts a
ClassInfoobject directly instead of aClassobject.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
interceptor
Bean interceptor.The interceptor to use for intercepting and altering getter and setter calls.
See Also:
- Parameters:
value- The new value for this setting.
The default value isBeanInterceptor.- Returns:
- This object.
-
interceptor
Bean interceptor.Same as the other interceptor method but accepts a
ClassInfoobject directly instead of aClassobject.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
interfaceClass
Bean interface class.Identifies a class to be used as the interface class for this and all subclasses. When specified, only the list of properties defined on the interface class will be used during serialization.
See Also:
- Parameters:
value- The new value for this setting. Can benull to clear any previously-set interface class.- Returns:
- This object.
-
interfaceClass
Interface class.Same as the other interfaceClass method but accepts a
ClassInfoobject directly instead of aClassobject.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
properties
Bean property includes.Specifies the set and order of names of properties associated with the bean class.
See Also:
- Parameters:
value- The new value for this setting.
Values can contain comma-delimited list of property names.- Returns:
- This object.
-
propertyNamer
Bean property namer.The class to use for calculating bean property names.
See Also:
- Parameters:
value- The new value for this setting.
The default isBasicPropertyNamer.- Returns:
- This object.
-
propertyNamer
Bean property namer.Same as the other propertyNamer method but accepts a
ClassInfoTypedobject directly instead of aClassobject.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
readOnlyProperties
Read-only bean properties.Specifies one or more properties on a bean that are read-only despite having valid getters.
See Also:
- Parameters:
value- The new value for this setting.
Values can contain comma-delimited list of property names.- Returns:
- This object.
-
unsortedProperties
Opt out of alphabetical property sorting for this specific bean.See Also:
- Returns:
- This object.
-
unsortedProperties
Opt out of alphabetical property sorting for this specific bean.See Also:
- Parameters:
value- The new value for this property.
The default isfalse .- Returns:
- This object.
-
stopClass
Bean stop class.Identifies a stop class for this class and all subclasses. Identical in purpose to the stop class specified by
Introspector.getBeanInfo(Class, Class).See Also:
- Parameters:
value- The new value for this setting. Can benull to clear any previously-set stop class.- Returns:
- This object.
-
stopClass
Stop class.Same as the other stopClass method but accepts a
ClassInfoobject directly instead of aClassobject.- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
typeName
Bean dictionary type name.Specifies the dictionary type name for this bean.
See Also:
- Parameters:
value- The new value for this setting.- Returns:
- This object.
-
writeOnlyProperties
Write-only bean properties.Specifies one or more properties on a bean that are write-only despite having valid setters.
See Also:
- Parameters:
value- The new value for this setting.
Values can contain comma-delimited list of property names.- Returns:
- This object.
-