Class ClassicBeanStyleWithOptionalSupport

    • Constructor Detail

      • ClassicBeanStyleWithOptionalSupport

        protected ClassicBeanStyleWithOptionalSupport()
        INSTANCE should be the only instance.
    • Method Detail

      • determineFieldTypeFromGetterAndSetter

        public Class<?> determineFieldTypeFromGetterAndSetter​(Class<?> beanType,
                                                              Method getterMethod,
                                                              Method setterMethod)
                                                       throws InvalidIBeanTypeException
        Description copied from class: BeanStyle
        Determines the type of a bean field from given corresponding getter and setter method. Implementations of this method can assume that both given methods have been checked for getter and setter compliance and that both methods match in terms of method names. Implementations need to determine the type of the field and need to check if both getter and setter match to the type. That means that for example not only the given setter should be looked at to find out the field type.
        Overrides:
        determineFieldTypeFromGetterAndSetter in class ClassicBeanStyle
        Parameters:
        beanType - the examined bean class
        getterMethod - a method of the beanType that is proven to be a potential getter
        setterMethod - a method of the beanType that is proven to be a potential setter
        Returns:
        the type of the bean field
        Throws:
        InvalidIBeanTypeException - if either the type cannot be determined for any reason or if the concluded types of setter and getter do not match