How can I do Java annotation like @name(“Luke”) with no attribute inside parenthesis?
Define the annotation with an attribute named value, then the attribute name can be omitted: @interface CustomAnnotation { String value(); } This can be used like so: @CustomAnnotation(“/main”) // …