To create an instance you need to create a class that implements:
- and the annotation you want to “simulate”
public class MySettings implements Annotation, Settings
But you need to pay special attention to the correct implementation of
hashCode according to the
If you do not want to implement this again and again then have a look at the javax.enterprise.util.AnnotationLiteral class.
That is part of the CDI(Context Dependency Injection)-API.
To get the default values you can use the way that is described by akuhn (former known as: Adrian).