blob: 4ec0564160e30221e71ee0d8da9a20f11a1ea6c2 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. 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">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>
Create Getters and Setters
</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
</head>
<body>
<h1>
Create Getters and Setters
</h1>
<p>
This dialog lets select the getter and setter methods to create.
</p>
<p>
Use <strong>Generate Getters and Setters</strong> from the <a href="ref-menu-source.htm">Source menu</a> or the context menu on a selected field or type, or a text selection in
a type to open the dialog.
The Generate Getters and Setters dialog shows getters and setters for all fields of the selected type. The methods are grouped by the type's fields.
</p>
<p>
The names of the getter and setter methods are derived from the field name. If you use a prefix or suffix for fields (e.g. fValue, _value, val_m), you can specify the
suffixes and prefixes in the <a href="ref-preferences-code-generation.htm">Code Style preference page</a> (Windows &gt; Preferences &gt; Java &gt; Code Style).
</p>
<p>
When pressing&nbsp;<strong>OK</strong>, all selected getters and setters are created.
</p>
<table border="1" cellspacing="0" cellpadding="5" width="100%">
<tr>
<th>
<p>
Option
</p>
</th>
<th>
<p>
Description
</p>
</th>
</tr>
<tr>
<td valign="top">
<p>
Select getters and setters to create
</p>
</td>
<td valign="top">
<p>
A tree containing getter and setter methods that can be created. Getters and setters are grouped by field their associated field.&nbsp;
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Select All
</p>
</td>
<td valign="top">
<p>
Select all getter and setter methods
</p>
</td>
</tr>
<tr>
<td valign="top">
<p>
Deselect All
</p>
</td>
<td valign="top">
<p>
Deselect all getter and setter methods
</p>
</td>
</tr>
</table>
<p>
You can control whether Javadoc comments are added to the created methods
with the <strong>Generate method comments</strong> option at the bottom of the dialog.</p>
<p>
<img src="../images/ngrelr.png" alt="Related reference" border="0" >
</p>
<p>
<a href="../reference/ref-menu-source.htm">Source actions</a>
</p>
</body>
</html>