The interface will mark a class as subject for Flag value injection during classpath scanning. It will also provide hints to the flag injector, like the flag variable prefix, intended to allow for more concise code.
public @interface InjectFlags {
Stringprefix() default"";
}The prefix hint allows for concise naming convention and resolves collisions with instance variables:
@InjectFlags(prefix = "flag_")
classMyThing {
@FlagDesc("This tells me what to '--do'...")
staticFlag<String> flag_do = Flags.create("Rest!");
finalStringdo;
MyThing() {
this.do = flag_do.get();
}
}
The interface will mark a class as subject for Flag value injection during classpath scanning. It will also provide hints to the flag injector, like the flag variable prefix, intended to allow for more concise code.
The prefix hint allows for concise naming convention and resolves collisions with instance variables: