@Target(value=FIELD) @Retention(value=RUNTIME) public @interface Value
If the string data value is not specified, the default is the Java field's name. For example:
public enum A { // value is "USE_FIELD_NAME" @Value USE_FIELD_NAME, // value is "specifiedValue" @Value("specifiedValue") USE_SPECIFIED_VALUE, // value is null @NullValue NULL_VALUE // not a value NOT_A_VALUE }
public abstract String value
"##default"
to use the Java field's
name.Copyright © 2011–2023 Google. All rights reserved.