Creating a nested interface
You can create interfaces that are enclosed in other types (that is, nested interfaces).
-
Open the New Java Interface wizard.
-
Edit the Source Folder field to indicate in which folder you want the new interface to reside. You can either type a path or click
the Browse button to find the folder. If a folder is found for the current selection, that folder appears in the
Source Folder field as the container for the new interface.
-
Select the Enclosing type checkbox.
-
In the Enclosing type field, type the name of the enclosing type or click the Browse button
to select the enclosing type for the new interface.
-
In the Name field, type a name for the new interface.
(Optionally, in a 5.0 project, add type parameters enclosed in < and >).
-
Select the public or default access modifier by using the Modifiers radio buttons.
-
Select the static checkbox if you want the new interface to be static.
-
Click the Add button to add interfaces for the new interface to extend.
(Optionally, in a 5.0 project, add type arguments enclosed in < and >).
-
Click Finish when you are done.
Note: The new interface is created in the same compilation unit as its enclosing type.
Java projects
Creating a new Java interface
Creating a top-level interface
Creating a new interface in a compilation unit
Renaming a type
New Java Interface wizard
Java Toolbar actions
Package Explorer