Skip to content

Commit f9c6360

Browse files
PLUGINAPI-194 Make PropertyDefinition.create public (#297)
1 parent b6c60f7 commit f9c6360

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 13.8
4+
* New public API `PropertyDefinition.create(Property)` to create properties from a `@Property` annotations
5+
36
## 13.6
47
* Deprecate `org.sonar.api.config.PropertyDefinitions`. Use `PropertyDefinition.builder(String)` to declare properties instead.
58
* Add severity metric keys to `org.sonar.api.measures.CoreMetrics`:

plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ public static Builder builder(String key) {
173173
return new Builder(key);
174174
}
175175

176-
static PropertyDefinition create(Property annotation) {
176+
/**
177+
* Creates a {@link PropertyDefinition} from a {@link Property} annotation.
178+
*
179+
* @since 13.8
180+
*/
181+
public static PropertyDefinition create(Property annotation) {
177182
Builder builder = PropertyDefinition.builder(annotation.key())
178183
.name(annotation.name())
179184
.defaultValue(annotation.defaultValue())

0 commit comments

Comments
 (0)