If you promote a method to an interface, you can easily demote
the method.
Note: The import statement added to the interface class when you
promoted the method will not be removed from the interface class when you
demote the method because we cannot guarantee that it is not being used by
other methods. A warning message of "Import is never used" may appear in the
Problems view if this warning level is turned on in the Preferences.
To
demote a method that was previously promoted to an interface:
- Select the Java™ file that contains the promoted method,
and open the file in the Java editor.
- In the Outline view, right-click the business method that you want
to demote, and select the appropriate option, depending on the interface that
you are demoting it from:
- Save your changes and close the Java editor.
The demoted method is removed from the interface. The import statement
that was added during promote is not removed.