Is there a class equivalent of custom annotations in java? -


i need have set of annotated interfaces corresponding enum

for eg:

enum type {   a,   b,   c } 

i using custom annotations ensure don't have define multiple annotations (there lot of types in use case)

@interface typeannotation {   type value(); } 

unfortunately there nothing can define interfaces this. hence, have make multiple classes like:-

@typeannotation(type.a) public interface typeainterface {}  @typeannotation(type.b) public interface typebinterface {} .... 

i don't need define inside these interfaces, need define annotated interfaces use in framework using. hence, looking analogue custom annotations save me boilerplate.

a generic type generic class or interface parameterized on types. i'm looking generic interface parameterized on enum values.


Comments

Popular posts from this blog

The SDK directory does not exist (ubuntu 16.04) (react native) -

python - How to clone or copy a list? -

python - How to use Celery in Tornado with redis as broker and backend? -