refactoring-extract-superclass - Extract Superclass Code Refactoring Technique
Create a new superclass from classes sharing common fields and methods to eliminate duplication
Tags
Updated: 2026-02-23Capabilities
Typical Inputs
Typical Outputs
What this skill does
- create empty superclass
- make classes extend superclass
- pull up shared fields
- pull up shared methods
- move constructor logic
Inputs
- source code files
- class definitions
- shared fields
- shared methods
Outputs
- refactored code
- new superclass definition
- updated class hierarchies
- consolidated shared logic
Requirements
- code editor
- object-oriented programming understanding
- testing environment
