public enum LabelFunction extends Enum<LabelFunction>
Only describes built-in label functions. Admins can extend the logic arbitrarily using Prolog rules, in which case the choice of function in the project config is ignored.
Function semantics are documented in config-labels.txt
, and actual behavior is
implemented in Prolog in gerrit_common.pl
.
Enum Constant and Description |
---|
ANY_WITH_BLOCK |
MAX_NO_BLOCK |
MAX_WITH_BLOCK |
NO_BLOCK |
NO_OP |
PATCH_SET_LOCK |
Modifier and Type | Field and Description |
---|---|
static Map<String,LabelFunction> |
ALL |
Modifier and Type | Method and Description |
---|---|
String |
getFunctionName()
The function name as defined in documentation and
project.config . |
boolean |
isBlock()
Whether the label is a "block" label, meaning a minimum vote will prevent submission.
|
static Optional<LabelFunction> |
parse(String str) |
static LabelFunction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LabelFunction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LabelFunction MAX_WITH_BLOCK
public static final LabelFunction ANY_WITH_BLOCK
public static final LabelFunction MAX_NO_BLOCK
public static final LabelFunction NO_BLOCK
public static final LabelFunction NO_OP
public static final LabelFunction PATCH_SET_LOCK
public static final Map<String,LabelFunction> ALL
public static LabelFunction[] values()
for (LabelFunction c : LabelFunction.values()) System.out.println(c);
public static LabelFunction valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Optional<LabelFunction> parse(String str)
public String getFunctionName()
project.config
.public boolean isBlock()