private static void generateRefresh ( String sharedPreferenceName , String className ) { MethodSpec . Builder method = MethodSpec . methodBuilder ( "refresh" ) . addModifiers ( Modifier . PUBLIC ) . addJavadoc ( "force to refresh values\n" ) . returns ( className ( className ) ) ; method . addStatement ( "createPrefs()" ) ; method . addStatement ( "return this" ) ; builder . addMethod ( method . build ( ) ) ; }
Generate refresh .