private void variantsFieldInit ( MethodSpec . Builder method , String fieldName , Variants v ) { Stmt b = new Stmt ( ) ; b . append ( "$L = new $T(" , fieldName , FIELD_VARIANTS ) ; b . append ( "\n " ) . append ( v . abbreviated ) . comma ( ) ; b . append ( "\n " ) . append ( v . narrow ) . comma ( ) ; b . append ( "\n " ) . append ( v . short_ ) . comma ( ) ; b . append ( "\n " ) . append ( v . wide ) ; b . append ( ")" ) ; method . addStatement ( b . format ( ) , b . args ( ) ) ; }
Appends a statement that initializes a FieldVariants field in the superclass .