-
Notifications
You must be signed in to change notification settings - Fork 66
/
ref-wizard-class.htm
141 lines (97 loc) · 5.52 KB
/
ref-wizard-class.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2014. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>New Java Class Wizard</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"> </script>
</head>
<body>
<h1>New Java Class Wizard</h1>
<p>The
<a class="command-link" href='javascript:executeCommand("org.eclipse.ui.newWizard(newWizardId=org.eclipse.jdt.ui.wizards.NewClassCreationWizard)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="Opens the New Java Class wizard">
<b>New Java Class</b></a> wizard
helps you to create a new Java class in a Java project.</p>
<table border="1" cellspacing="0" cellpadding="5" summary="New Java class settings">
<caption>
Java Class Options<br>
</caption>
<tr>
<th>Option</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td align="left" valign="top">Source folder</td>
<td align="left" valign="top">Enter a source folder for the new class. Either type a valid source folder path or click <span class="control">Browse</span> to select a
source folder via a dialog.</td>
<td align="left" valign="top">The source folder of the element that was selected when the wizard has been started.</td>
</tr>
<tr>
<td align="left" valign="top">Package</td>
<td align="left" valign="top">Enter a package to contain the new class. You can select either this option or the Enclosing Type option, below. Either type a valid package
name or click <span class="control">Browse</span> to select a package via a dialog.</td>
<td align="left" valign="top">The package of the element that was selected when the wizard has been started.
If a source folder was selected which contains exactly one package then that package is used.
If the source folder does not contain any package then the project name is used if it is a valid package name.
</td>
</tr>
<tr>
<td align="left" valign="top">Enclosing type</td>
<td align="left" valign="top">Select this option to choose a type in which to enclose the new class. You can select either this option or the Package option, above. Either
type a valid name in the field or click <span class="control">Browse</span> to select a type via a dialog.</td>
<td align="left" valign="top">The type or the primary type of the compilation unit that was selected when the wizard has been started or <blank></td>
</tr>
<tr>
<td align="left" valign="top">Name</td>
<td align="left" valign="top">Type a name for the new class.</td>
<td align="left" valign="top"><blank></td>
</tr>
<tr>
<td align="left" valign="top">Modifiers</td>
<td align="left" valign="top">
<p>Select one or more access modifiers for the new class.</p>
<ul>
<li>Either public, package, private, or protected (private and protected are only available if you specify an enclosing type)</li>
<li>abstract</li>
<li>final</li>
<li>static (only available if you specify an enclosing type)</li>
</ul>
</td>
<td align="left" valign="top">public</td>
</tr>
<tr>
<td align="left" valign="top">Superclass</td>
<td align="left" valign="top">Type or click <span class="control">Browse</span> to select a superclass for this class.</td>
<td align="left" valign="top">The type (not the compilation unit!) that was selected when the wizard has been started or <java.lang.Object></td>
</tr>
<tr>
<td align="left" valign="top">Interfaces</td>
<td align="left" valign="top">Click <span class="control">Add</span> to choose interfaces that the new class implements.</td>
<td align="left" valign="top"><blank></td>
</tr>
<tr>
<td align="left" valign="top">Which method stubs would you like to create?</td>
<td align="left" valign="top">
<p>Choose the method stubs to create in this class:</p>
<ul>
<li>public static void main(String [] args): Adds a main method stub to the new class.</li>
<li>Constructors from superclass: Copies the constructors from the new class's superclass and adds these stubs to the new class.</li>
<li>Inherited abstract methods: Adds to the new class stubs of any abstract methods from superclasses or methods of interfaces that need to be implemented.</li>
</ul>
</td>
<td align="left" valign="top">Inherited abstract methods enabled</td>
</tr>
<tr>
<td align="left" valign="top">Do you want to add comments?</td>
<td align="left" valign="top">When selected, the wizard adds comments to the new class where appropriate.</td>
<td align="left" valign="top">Do not add comments</td>
</tr>
</table>
<h3 class="related">Related references</h3>
<a href="../reference/ref-menu-file.htm">File actions</a>
</body>
</html>