private void addConstructorParameter ( final MethodSpec . Builder constructorBuilder , final String attributeName , final TypeName type ) { constructorBuilder . addParameter ( type , attributeName , Modifier . FINAL ) ; constructorBuilder . addCode ( "this." + attributeName + "=" + attributeName + ";" ) ; }
adds attribute to constructor