-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
9
-
generic
-
generic
A DESCRIPTION OF THE REQUEST :
Currently only primitives, enums, Class, other annotations, Strings and arrays of these types are allowed as "arguments".
It should be allowed to use "generic enums" as well, meaning instances of interfaces, that are used in enums.
Hence this code should become compilable:
public interface I
{
void doIt();
}
public enum E1 implements I
{
A, B, C;
public void doIt() {};
}
public enum E2 implements I
{
D, E, F;
public void doIt() {};
}
public @interface A
{
Enum< I > value();
}
JUSTIFICATION :
It is currently not possible to use values of arbitrary (or a restricted subset of) enum as argument type. With this suggestion this is possible.
Currently only primitives, enums, Class, other annotations, Strings and arrays of these types are allowed as "arguments".
It should be allowed to use "generic enums" as well, meaning instances of interfaces, that are used in enums.
Hence this code should become compilable:
public interface I
{
void doIt();
}
public enum E1 implements I
{
A, B, C;
public void doIt() {};
}
public enum E2 implements I
{
D, E, F;
public void doIt() {};
}
public @interface A
{
Enum< I > value();
}
JUSTIFICATION :
It is currently not possible to use values of arbitrary (or a restricted subset of) enum as argument type. With this suggestion this is possible.