Interface BeanMutatorAccessorResolver
-
- All Known Implementing Classes:
BeanMutatorAccessorResolver.AnnotationPropertyResolver,BeanMutatorAccessorResolver.CompositeResolver,BeanMutatorAccessorResolver.GensonAnnotationPropertyResolver,BeanMutatorAccessorResolver.PropertyBaseResolver,BeanMutatorAccessorResolver.StandardMutaAccessorResolver,BeanViewDescriptorProvider.BeanViewMutatorAccessorResolver,PropertyFilter
public interface BeanMutatorAccessorResolverBeanMutatorAccessorResolver interface must be implemented by class who want to resolve mutators (fields or methods that allow you to modify a property), accessors (fields or methods that allow you to retrieve the value of a property) and creators (constructors or static methods that allow you to create objects). All methods return aTrilean, so it may be TRUE, FALSE or UNKNOWN. This will allow us to separate the kind of information each implementation works on (one for annotations, another for visibility, etc) and to chain them. It also allows an easier addition of new features without modifying the existing code. Have a look at StandardMutaAccessorResolver for an example of BeanMutatorAccessorResolver implementation. To register your own implementation instead of the one by default use the genson builder.new Genson.Builder().set(yourImplementation).create();
- Author:
- Eugen Cepoi
- See Also:
Trilean,BeanMutatorAccessorResolver.StandardMutaAccessorResolver,AbstractBeanDescriptorProvider,BaseBeanDescriptorProvider,BeanViewDescriptorProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBeanMutatorAccessorResolver.AnnotationPropertyResolverA basicAnnotationscanningBeanMutatorAccessorResolverassuming the use of three primaryAnnotations:propertyAnnotation: an annotation, such asJsonProperty, denoting a property to serialize/deserialize.static classBeanMutatorAccessorResolver.CompositeResolverstatic classBeanMutatorAccessorResolver.GensonAnnotationPropertyResolverstatic classBeanMutatorAccessorResolver.PropertyBaseResolverstatic classBeanMutatorAccessorResolver.StandardMutaAccessorResolverStandard implementation of BeanMutatorAccessorResolver.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TrileanisAccessor(Field field, Class<?> fromClass)TrileanisAccessor(Method method, Class<?> fromClass)TrileanisCreator(Constructor<?> constructor, Class<?> fromClass)TrileanisCreator(Method method, Class<?> fromClass)booleanisCreatorAnnotated(Constructor<?> constructor)booleanisCreatorAnnotated(Method method)TrileanisMutator(Field field, Class<?> fromClass)TrileanisMutator(Method method, Class<?> fromClass)
-
-
-
Method Detail
-
isCreator
Trilean isCreator(Constructor<?> constructor, Class<?> fromClass)
-
isCreatorAnnotated
boolean isCreatorAnnotated(Constructor<?> constructor)
-
isCreatorAnnotated
boolean isCreatorAnnotated(Method method)
-
-