Java source refactoring of 7000 references

前端 未结 12 1145
醉梦人生
醉梦人生 2020-12-25 13:05

I need to change the signature of a method used all over the codebase.

Specifically, the method void log(String) will take two additional arguments (

12条回答
  •  醉酒成梦
    2020-12-25 13:24

    Maybe I'm being naive, but why can't you just overload the method name?

    void thing(paramA) {
        thing(paramA, THE_DEFAULT_B, THE_DEFAULT_C)
    }
    
    void thing(paramA, paramB, paramC) {
        // new method
    }
    

提交回复
热议问题