boolean hasCompatibleReturnTypes ( Class type , Method method ) { Field correspondingField = getCorrespondingField ( type , method ) ; return correspondingField != null && method . getReturnType ( ) . isAssignableFrom ( correspondingField . getType ( ) ) ; }
Getter method and field must have compatible fields .