@Documented
@Target(value=METHOD)
@Retention(value=RUNTIME)
@MirroredAnnotation
public @interface GetterFor
An annotation to specify that an abstract method is a getter for a model field.
This must be placed either on a no-arg method,
or a single-arg method with a parameter type assignable to return type (value-if-null)
If this annotation is missing from a zero-arg method structured with a "getter-like-name",
and that method does not have any other @*For model field annotations,
then the method will be treated as an implied @GetterFor.
In other words, you don't need to annotate either of these methods:
String getField();
String field();
But if the field's name will be "field", then you would have to annotate:
- Author:
- "James X. Nelson (james@wetheinter.net)"