private boolean hasToBuilderMethod ( DeclaredType builder , boolean isExtensible , Iterable < ExecutableElement > methods ) { for ( ExecutableElement method : methods ) { if ( isToBuilderMethod ( builder , method ) ) { if ( ! isExtensible ) { messager . printMessage ( ERROR , "No accessible no-args Builder constructor available to implement toBuilder" , method ) ; } return true ; } } return false ; }
Find a toBuilder method if the user has provided one .