- On the main menu, choose . Alternatively, right-click the editor and choose Generate on the context menu, or use Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertCtrl+N or Alt+InsertAlt+InsertAlt+InsertControl N or Control EnterControl N or Control EnterMeta N or Control Enter keyboard shortcut.
- In the pop-up list that is displayed in the editor, select Delegate Methods. Select Target To Generate Delegates For dialog appears, displaying the list of objects to be delegated to.
- Select the target field or method, and click OK. The Select Method To Generate Delegation For dialog appears, displaying the list of methods to delegate.
- Select the desired methods. For multiple selection, use Ctrl and Shift keys. Click OK.
Example
Currency class has a field calendar of the type Calendar. To gain access to certain functionality of the Calendar class from the Currency class, we need to create a new method that will delegate the request to calendar.
Calendar calendar; public int get(int i) { return calendar.get(i); }

