CODEARTS IDE-将匿名类转换为内部类:重构前

时间:2024-04-16 15:05:25

重构前

class AnonymousToInner {
   public TestClass method() {
      final int i = 0;
      final String str = "string";
      return new TestClass() {
         public String str () {
            return str;
         }
         public int publicMethod() {
            return i;
         }
      };
   }
}
support.huaweicloud.com/usermanual-codeartside/codeartside_01_0154.html