Return this flag's current value.
Return this flag's current value. The default value is returned when the flag has not otherwise been set.
String representation of this flag's default value
String representation of this flag's default value
Get the value if it has been set.
Get the value if it has been set.
if no user-defined value has been set, None
will be
returned even when a default value is supplied.
Get the value if it has been set or if there is a default value supplied.
Get the value if it has been set or if there is a default value supplied.
Flag.get and Flag.isDefined if you are interested in determining if there is a supplied value.
True if the flag has been set.
True if the flag has been set.
if no user-defined value has been set, false
will be
returned even when a default value is supplied.
Override the value of this flag with t
, only for the scope of the current
com.twitter.util.Local for the given function f
.
Override the value of this flag with t
, only for the scope of the current
com.twitter.util.Local for the given function f
.
Indicates whether or not the flag is valid without an argument.
Indicates whether or not the flag is valid without an argument.
Parse this flag with no argument.
Parse this flag with no argument.
Parse value raw
into this flag.
Parse value raw
into this flag.
Reset this flag's value
Reset this flag's value
String representation of this flag in -foo='bar' format, suitable for being used on the command line.
String representation of this flag in -foo='bar' format, suitable for being used on the command line.
Subclasses of GlobalFlag (that are defined in libraries) are "global" in the sense that they are accessible by any application that depends on that library. Regardless of where in a library a GlobalFlag is defined, a value for it can be passed as a command-line flag by any binary that includes the library. The set of defined GlobalFlags can be enumerated (via
GlobalFlag.getAll)
by the application.All such global flag declarations in a given classpath are visible to and used by com.twitter.app.App.
A flag's name (as set on the command line) is its fully-qualified classname. For example, the flag
is settable by the command-line flag
-com.twitter.server.port
.Global flags may also be set by Java system properties with keys named in the same way. However, values supplied by flags override those supplied by system properties.