cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Use Supertype Where Possible Refactoring Specification

$Id: usesupertypewherepossible.html,v 1.1 2005/03/11 09:11:45 pflaska Exp $ (see full CVS history)

Feature allows to replace references to certain type by one of its supertype, if it is possible. Implementation of this refactoring is tracked issue 56231.

Pre-Conditions

  1. A single type has to be selected.

Pre-Checks

No specific checks.

Parameters

  1. Supertype to be used instead of current selected type.

Fast Parameters Check

No specific checks.

Parameters Check

No specific checks.

Changes To Be Made

  1. Collect declaration references and change their type to selected supertype.

Checks During Changes Preparation

  1. Check, if the super type is visible in all declaration references. (E.g. when certain type is public and selected supertype is not public.)
  2. Check the access modifiers on supertype features.

Refactoring UI

Menu item: Use Supertype where Possible...
Action title: Use Supertype where Possible - type_name

The panel will display list of all supertypes of certain type (class hierarchy). User has to select supertype, which will be used instead of subtype.

----------------------------------------
|                                      |
| Supertype to Use:                    |
| |----------------------------------| |
| | Object                           | |
| | MyClass                          | |
| | MyExtendedClass                  | |
| |--------------------------------- | |
| [ ] Apply Refactoring on Comments    |
----------------------------------------

Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems