If you promote a method to an
interface, you can easily demote the method.
About this task
Note: The import statement added to the interface class when
you promoted the method is not 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"
appears in the Problems view if this warning level is turned on in
the Preferences.
Procedure
- Open the Java™ editor
in one of the following ways:
- In the Project Explorer view of the Java EE perspective, select the Java file for the bean class that contains the
method to be promoted. Select .
- 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.
Results
The demoted method is removed from the interface. The import
statement that was added during promote is not removed.