Package org.coliper.ibean
Class CachedIBeanMetaInfoParser
- java.lang.Object
-
- org.coliper.ibean.IBeanMetaInfoParser
-
- org.coliper.ibean.CachedIBeanMetaInfoParser
-
public class CachedIBeanMetaInfoParser extends IBeanMetaInfoParser
Extension ofIBeanMetaInfoParserusing an internal cache to reuse meta information once created withparse(Class, BeanStyle, List). This is the default implementation ofIBeanMetaInfoParserused by IBean framework.The internal cache is very simple and does not have a timeout or size limit assuming meta informations do not change over runtime and assuming a limited number of bean types.
-
-
Constructor Summary
Constructors Constructor Description CachedIBeanMetaInfoParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> IBeanTypeMetaInfo<T>parse(Class<T> beanType, BeanStyle beanStyle, List<Class<?>> ignorableSuperInterfaces)Validates if a given class matches all criteria for being an IBean interface and if that is the case then retrieves all relevant information about the all fields contained in the class.
-
-
-
Method Detail
-
parse
public <T> IBeanTypeMetaInfo<T> parse(Class<T> beanType, BeanStyle beanStyle, List<Class<?>> ignorableSuperInterfaces)
Description copied from class:IBeanMetaInfoParserValidates if a given class matches all criteria for being an IBean interface and if that is the case then retrieves all relevant information about the all fields contained in the class. SeeIBeanFieldMetaInfoabout what information is gathered for each field.A given type is a valid IBean interface if following criteria match:
- The bean type contains no methods other setters and getters, with the exception of methods of some specifically excluded super interfaces.
- All getters and setters match to the used
BeanStyle. - Every getter method has a matching setter and vice versa.
- Overrides:
parsein classIBeanMetaInfoParser- Type Parameters:
T- generic typeTis the bean class provided with parameterbeanType- Parameters:
beanType- the IBean interface candidate to parsebeanStyle- the bean style to use for parsingignorableSuperInterfaces- a list of super interfaces of the providedbeanTypewhose methods should be excluded from being considered as getters and setters. These interfaces are typically extension interfaces likeFreezable.- Returns:
- the meta information for the IBean interface
-
-