-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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 {
String prefix() default "";
}
The prefix hint allows for concise naming convention and resolves collisions with instance variables:
@InjectFlags(prefix = "flag_")
class MyThing {
@FlagDesc("This tells me what to '--do'...")
static Flag<String> flag_do = Flags.create("Rest!");
final String do;
MyThing() {
this.do = flag_do.get();
}
}
Metadata
Metadata
Assignees
Labels
No labels