private void addParams ( TypeSpec . Builder parent , LocaleID id , NumberData data ) { MethodSpec . Builder code = MethodSpec . constructorBuilder ( ) ; code . addStatement ( "this.decimal = $S" , data . decimal ) ; code . addStatement ( "this.group = $S" , data . group ) ; code . addStatement ( "this.percent = $S" , data . percent ) ; code . addStatement ( "this.minus = $S" , data . minus ) ; code . addStatement ( "this.plus = $S" , data . plus ) ; code . addStatement ( "this.exponential = $S" , data . exponential ) ; code . addStatement ( "this.superscriptingExponent = $S" , data . superscriptingExponent ) ; code . addStatement ( "this.perMille = $S" , data . perMille ) ; code . addStatement ( "this.infinity = $S" , data . infinity ) ; code . addStatement ( "this.nan = $S" , data . nan ) ; code . addStatement ( "this.currencyDecimal = $S" , data . currencyDecimal ) ; code . addStatement ( "this.currencyGroup = $S" , data . currencyGroup ) ; TypeSpec . Builder params = TypeSpec . classBuilder ( "_Params" ) . superclass ( NumberFormatterParams . class ) . addModifiers ( PRIVATE , STATIC ) . addMethod ( code . build ( ) ) ; parent . addType ( params . build ( ) ) ; }
Construct s the locale s number formatter params .