Package org.sonar.api
Annotation Type Property
-
@Retention(RUNTIME) @Target(TYPE) public @interface Property
Property 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.String
category
java.lang.String
defaultValue
The empty string "" is considered as null, so it's not possible to have empty strings for default values.java.lang.String
deprecatedKey
Relocation of key.java.lang.String
description
PropertyField[]
fields
A Property with fields is considered a property set.boolean
global
Is the property displayed in global settings page ?boolean
module
Is the property displayed in module settings page ? A module is a maven sub-project.boolean
multiValues
Can the property take multiple values.java.lang.String[]
options
Options for *_LIST typesboolean
project
Is the property displayed in project settings page ?java.lang.String
propertySetKey
Deprecated.since 6.1, as it was not used and too complex to maintain.PropertyType
type
-
-
-
-
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_LIST
For 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:REGEXP
andtype:comma_separated__list_of_types
.
For examplekey:new_.*
will match any metric which key starts bynew_
.
For exampletype:INT,FLOAT
will match any metric of typeINT
orFLOAT
.
For exampletype:NUMERIC
will match any metric of numerictype.
- Default:
- {}
-
-
-
fields
PropertyField[] fields
A Property with fields is considered a property set.- Since:
- 3.3
- Default:
- {}
-
-