1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
4
* Use is subject to license terms.
8
<title>Extract Interface Dialog Box</title>
9
<link rel="StyleSheet" href="nbdocs://org.netbeans.modules.usersguide/org/netbeans/modules/usersguide/ide.css" type="text/css">
12
<h2>Extract Interface Dialog Box</h2>
13
<p><small> <a href="#seealso">See Also</a> </small></p>
14
<p>Use this dialog box to specify options for the Extract Interface refactoring command.
15
You can use the Extract Interface command to create a new interface based
16
on public non-static methods in the selected class. When you
17
use this operation, a new interface is created containing declarations for the
18
the methods that you select to include in the interface. In addition, the current class
19
is set to implement the new interface.</p>
21
<p>You can open the Extract Interface dialog box by choosing Refactor > Extract Interface
22
after you have selected a class in the Source Editor, Projects window, or Files window.
25
<p>The dialog box has the following fields:</p>
27
<li><b>Interface Name.</b> Contains the name of the interface
30
<li><b>Members to Extract.</b> List of methods and interfaces that you can include in
31
the new interface. Select the checkbox of each method that you want to include in the interface.
32
<p>Only <tt>public</tt> and non-static methods appear in this list.</p>
33
<p>If the class from which you are extracting an interface already
34
implements an interface, the implemented interface is also listed.
35
If you select the checkbox for that
36
interface, the <tt>implements</tt> clause for that new
37
interface is moved to the new interface that you are extracting.</p>
43
<p>If you want to preview the changes, you need to follow these steps
44
to complete the refactoring:</p>
48
window opens and displays a tree view of the code to be affected by the refactoring.</p>
50
<li>Check the items displayed in the Refactoring window to make sure that you want them
51
all changed. Clear the checkbox next to any parts of the code that
52
you do not want changed.
53
<li>Click Do Refactoring.</li>
57
<li>You should always perform a clean build after completing
58
any refactoring commands. You can do a clean build by right-clicking the project's
59
node in the Projects window and choosing Clean and Build Project.
64
<dt><a name="seealso">See Also</a></dt>
65
<dd><a href="../aboutRefactoring.html">About Refactoring</a></dd>
66
<dd><a href="../refactorQuickRef.html">Refactoring: Quick Reference</a>
67
<dd><a href="../undo.html">Undoing Refactoring Changes</a></dd>
70
<small><a href="../../credits.html">Legal Notices</a></small>
71
<table cellpadding="50" border="0">