我有班级和建设者。
Builder只能在测试代码中使用,我不想在生产代码中使用它。
我的课程:
public class MyClassThatIWantBuilderFor {
// many fields that I want initialize using builder instead of 10 arg constructor
}
我的测试用例:
public class MyTest {
// I want to have builder for MyClassThatIWantBuilderFor class here
}
如何在自动值中实现它?