This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195670

Summary: Create Wrapper/ Decorator Action and File Template
Product: java Reporter: puce <puce>
Component: SourceAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description puce 2011-02-18 17:57:39 UTC
Provide an action from the context menu of interfaces (e.g. New->Wrapper) and a file template (in the New File dialog) to create a Wrapper class from an interface.


public interface MyInterface{
  void setBor(Bar bar);
  Bar getBar();
  void foo();

should create:

public class MyInterfaceWrapper{
  private final MyInterface myInterface;

  public MyInterfaceWrapper(MyInterface myInterface){
    this.myInterface = myInterface;

  public void setBoo(Bar bar){
  public Bar getBar(){
    return myInterface.getBar();

  public void foo(){;