A DESCRIPTION OF THE REQUEST :
This would allow developers to govern an interface for an enum to implement. I noticed that you have had a request raised in this department before (6222244) but there is no technical reasons as to why you rejected it. The request, it seems to me, was perfectly valid and did not break any contracts.
JUSTIFICATION :
By not adding this you force development to reject enum architecture and retreat to classes to accomplish the same thing. This seems non nonsensical in that developers can work-a-round the problem, but this obviously costs in development time and the solution is less elegant.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
[public] abstract enum XYZ {
//NOTE NO ENUM DEFINITIONS ALLOWED
protected a;
protected b;
protected XYZ(a,b) {
}
}
public enum BLA extends XYZ {
ENUM1(aVal, bVal),
ENUM2(aVal, bVal);
}
CUSTOMER SUBMITTED WORKAROUND :
[public] abstact XYZ {
a;
b;
[public] XYZ(a,b) {
this.a = a;
this.b = b;
}
//and the usual getters....
}
[public] final class XYZImpl extends XYZ {
[public] XYZ(a,b) {
super(a,b);
}
}
public class BLA {
public static final XYZ ENUM1 = new XYZImpl(aVal, bVal);
public static final XYZ ENUM2 = new XYZImpl(aVal, bVal);
}