private String generatedBuilderSimpleName ( TypeElement type ) { String packageName = elements . getPackageOf ( type ) . getQualifiedName ( ) . toString ( ) ; String originalName = type . getQualifiedName ( ) . toString ( ) ; checkState ( originalName . startsWith ( packageName + "." ) ) ; String nameWithoutPackage = originalName . substring ( packageName . length ( ) + 1 ) ; return String . format ( BUILDER_SIMPLE_NAME_TEMPLATE , nameWithoutPackage . replaceAll ( "\\." , "_" ) ) ; }
Returns the simple name of the builder class that should be generated for the given type .