Quickly create class from an interface in eclipse

后端 未结 5 940
时光取名叫无心
时光取名叫无心 2020-12-29 20:16

Is there a plugin for eclipse which allows me to quickly generate a new class from an interface?

Rather than having to do the typing in the new class dialog

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-29 20:55

    It was actually asked as soon as 2002

    The refactoring should extract all (switch for "all public") methods from a class, create an interface and rename the old class to ClassnameImpl.

    ... and entered as a feature request, "resolved "in ticket 9798, because the New->Class will have the option "Inherited abstract method" (since at least Eclipse SDK 2.1 2003) for you to choose in order to automatically implement those public abstract methods.

    alt text

提交回复
热议问题