Dashboard > WG: Programmer's Cafe > ... > Eclipse Tips > Implementing an interface
  WG: Programmer's Cafe Log In | Signup View a printable version of the current page.  
  Implementing an interface
Added by Aaron Zeckoski, last edited by Aaron Zeckoski on May 21, 2006  (view change)
Labels: 
(None)

  • Follow these steps to implement an existing interface class in Eclipse
  1. Choose or create a folder in a java source directory to put the implementation class in
  2. Right click on that folder and select New -> Class
  3. Enter a Name for the implementation class (e.g. MyClassImpl)
  4. Click the Add button to the right of Interfaces:
  5. Enter the name of the existing interface class (all near matches should appear in the box below)
  6. Select the interface class in the Matching Types: box and click OK
  7. Under Which method stubs would you like to create? check the box marked Inherited abstract methods
    • Note: All other checkboxes should be unchecked
  8. Click Finish to generate the new interface implementation class

Site running on a free Atlassian Confluence Open Source Project License granted to Sakai Foundation. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators