table of Contents
IDEA quickly generate the get / set body
- Method 1. alt + enter automatically created at the bottom, more convenient, but the need to move the cursor to a specified variable;
- Method 2. Right Generate / alt + insert without first specified variable, but need to make sure the output variables and output over the method body in variable declaration;
Method 1. alt + enter
- Move the cursor to specify a variable name, press the alt + enter;
- Select output method thereof, where the selected Create getter and setter for 'name', generates a corresponding set / get the method under the variables declared in the body;
Method 2. Right Generate / alt + insert
- Right select Generate, or by alt + insert;
- Select output method thereof, where the selected Getter and Setter;
- Select the variable to be output;
- Generating method body above the variable declaration;