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.
Say you have public enum Foo { A, B; public Bar getBar() { switch(this) { case A : return new A_Bar(); case B : return new B_Bar(); default : throw new AssertionError("" + this); } interface Bar() {} class A_Bar implements Bar {} } The line return new B_Bar(); will give you a create class hint. We know the return type of getBar() is Bar. But the class generated if you accept the hint is public class B_Bar { public B_Bar() { } } Two things could improve the result: 1. It could be public class B_Bar implements Bar 2. If Bar is package private, make the generated class and constructor package-private too.
Definitely. Thanks for your ideas.