Descriptor can infer the corresponding Describable most of the time, because it's the outer class.

This is more DRY.

This should also work for anonymous classes, so those changes to follow.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14747 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-01-23 16:09:15 +00:00
1 parent aa14701507
commit ac848d085f
67 files changed
+151 -224

No files matched your search

@@ -31,10 +31,6 @@ public class FailureBuilder extends Builder {
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();
public static final class DescriptorImpl extends Descriptor<Builder> {
private DescriptorImpl() {
super(FailureBuilder.class);
}
public Builder newInstance(StaplerRequest req, JSONObject data) {
throw new UnsupportedOperationException();
}
@@ -36,10 +36,6 @@ public class SleepBuilder extends Builder {
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();
public static final class DescriptorImpl extends Descriptor<Builder> {
private DescriptorImpl() {
super(SleepBuilder.class);
}
public Builder newInstance(StaplerRequest req, JSONObject data) {
throw new UnsupportedOperationException();
}