Clone Member Variable Dialog Box

   

Allows you to create a new member variable based on a member variable that is already defined in your class.

With the Clone Member Variable dialog box you can:

Options

Member Variable Name

A text box that allows you to specify the name of the member variable. The name must be a valid Java identifier.

Data Type

A dialog box that allows you to specify the data type for the member variable. A list of standard data types is provided to select from. You can enter a valid data type that is not specified in the list by entering it into the edit portion of the dialog box. User defined types that are entered in the dialog box are not added to the list.

Access

A list that allows you to apply an access modifier to the member variable. You can choose from the default (package), public, protected, and private access modifiers.

Static

When selected, applies the static modifier to the member variable declaration. A static member variable may be accessed without using an instance of the class the member variable is defined in. Static member variables retain their value through the life of the application.

Transient

When selected, applies the transient modifier to the member variable declaration. A member variable defined with the transient modifier will not store its state in a class object's persistent storage.

Final

When selected, applies the final modifier to the member variable declaration. A member variable defined with the final modifier cannot be modified - its value stays constant. When you declare a member variable as final, you must specify a value in the Initial Value text box of the dialog.

Volatile

When selected, applies the volatile modifier to the member variable declaration. A volatile member variable is not optimized by the compiler. This allows the member variable to be modified by external processes.

Initial Value

A text box that allows you to specify the initial value for the member variable. The value should be in a data type that matches the member variable's data type or errors will occur during compilation.

Javadoc Comment

A text box that allows you to create Javadoc comments for the member variable. The Javadoc comment allows you to document the member variable and any related information about the member variable.