public class BeanDescriptionFactoryImpl extends Object implements BeanDescriptionFactory
BeanPropertyDescription objects for a given class.
This description factory returns property descriptions for all properties on a class for which a getter and setter is associated. Inherited properties are considered.
This implementation supports ExportName and transient properties, declared either
with the transient keyword or by adding the Transient annotation.
| Constructor and Description |
|---|
BeanDescriptionFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected List<BeanPropertyDescription> |
collectAllProperties(Class<?> clazz)
Collects all properties available on the given class.
|
protected List<Class<?>> |
collectClassAndAllParents(Class<?> clazz)
Returns a list of the class' parents, including the given class itself, with the top-most parent
coming first.
|
protected BeanPropertyDescription |
convert(PropertyDescriptor descriptor)
Converts a
PropertyDescriptor to a BeanPropertyDescription object. |
protected Map<String,Integer> |
createFieldNameOrderMap(Class<?> clazz)
Creates a map of index (encounter number) by field name for all fields of the given class,
including its superclasses.
|
protected TypeInformation |
createTypeInfo(PropertyDescriptor descriptor) |
Collection<BeanPropertyDescription> |
getAllProperties(Class<?> clazz)
Returns all properties of the given bean class for which there exists a getter and setter.
|
protected String |
getPropertyName(PropertyDescriptor descriptor)
Returns the name which is used in the export files for the given property descriptor.
|
protected List<PropertyDescriptor> |
getWritableProperties(Class<?> clazz)
Returns all properties of the given class that are writable
(all bean properties with an associated read and write method).
|
protected List<PropertyDescriptor> |
sortPropertiesList(Class<?> clazz,
List<PropertyDescriptor> properties)
Returns a sorted list of the given properties which will be used for further processing and whose
order will be maintained.
|
protected void |
validateProperties(Class<?> clazz,
Collection<BeanPropertyDescription> properties)
Validates the class' properties.
|
public Collection<BeanPropertyDescription> getAllProperties(Class<?> clazz)
getAllProperties in interface BeanDescriptionFactoryclazz - the bean property to processprotected List<BeanPropertyDescription> collectAllProperties(Class<?> clazz)
clazz - the class to process@Nullable protected BeanPropertyDescription convert(PropertyDescriptor descriptor)
PropertyDescriptor to a BeanPropertyDescription object.descriptor - the descriptor to convertprotected void validateProperties(Class<?> clazz, Collection<BeanPropertyDescription> properties)
clazz - the class to which the properties belongproperties - the properties that will be used on the classprotected String getPropertyName(PropertyDescriptor descriptor)
descriptor - the descriptor to get the name forprotected TypeInformation createTypeInfo(PropertyDescriptor descriptor)
protected List<PropertyDescriptor> getWritableProperties(Class<?> clazz)
clazz - the class to processprotected List<PropertyDescriptor> sortPropertiesList(Class<?> clazz, List<PropertyDescriptor> properties)
clazz - the class from which the properties come fromproperties - the properties to sortprotected Map<String,Integer> createFieldNameOrderMap(Class<?> clazz)
clazz - the class to create the field index map forprotected List<Class<?>> collectClassAndAllParents(Class<?> clazz)
clazz - the class whose parents should be collectedCopyright © 2016–2019 The AuthMe Team. All rights reserved.