Package org.sonar.api
Annotation Type Property
-
@Retention(RUNTIME) @Target(TYPE) public @interface PropertyProperty value can be set in different ways :- System property
- Batch command-line (-Dfoo=bar in Maven or sonar-runner)
- Maven pom.xml (element <properties>)
- Maven settings.xml
- SonarQube web administration console
- Since:
- 1.10
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Stringcategoryjava.lang.StringdefaultValueThe empty string "" is considered as null, so it's not possible to have empty strings for default values.java.lang.StringdeprecatedKeyRelocation of key.java.lang.StringdescriptionPropertyField[]fieldsA Property with fields is considered a property set.booleanglobalIs the property displayed in global settings page ?booleanmoduleIs the property displayed in module settings page ? A module is a maven sub-project.booleanmultiValuesCan the property take multiple values.java.lang.String[]optionsOptions for *_LIST typesbooleanprojectIs the property displayed in project settings page ?java.lang.StringpropertySetKeyDeprecated.since 6.1, as it was not used and too complex to maintain.PropertyTypetype
-
-
-
-
category
java.lang.String category
- Since:
- 2.11
- See Also:
PropertyDefinition.category()
- Default:
- ""
-
-
-
type
PropertyType type
- Since:
- 3.0
- Default:
- org.sonar.api.PropertyType.STRING
-
-
-
options
java.lang.String[] options
Options for *_LIST types- Since:
- 3.0 Options for property of type
PropertyType.SINGLE_SELECT_LISTFor example {"property_1", "property_3", "property_3"})., 3.3 Options for property of typePropertyType.METRIC
If no option is specified, any metric will match.
If options are specified, all must match for the metric to be displayed.
Three types of filter are supportedkey:REGEXP,domain:REGEXPandtype:comma_separated__list_of_types.
For examplekey:new_.*will match any metric which key starts bynew_.
For exampletype:INT,FLOATwill match any metric of typeINTorFLOAT.
For exampletype:NUMERICwill match any metric of numerictype.
- Default:
- {}
-
-
-
fields
PropertyField[] fields
A Property with fields is considered a property set.- Since:
- 3.3
- Default:
- {}
-
-