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
Post a Comment