From c99b01bd465e07134bfffe59edfe166281791148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Tue, 4 Dec 2018 13:52:42 +0100 Subject: [PATCH] Deprecate BooleanProperty --- .../pmd/properties/BooleanProperty.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/properties/BooleanProperty.java b/pmd-core/src/main/java/net/sourceforge/pmd/properties/BooleanProperty.java index acac8d414a..0f3ef45b96 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/properties/BooleanProperty.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/properties/BooleanProperty.java @@ -15,7 +15,10 @@ import net.sourceforge.pmd.properties.builders.SingleValuePropertyBuilder; * * @author Brian Remedios * @version Refactored June 2017 (6.0.0) + * @deprecated Use a {@code PropertyDescriptor} instead. A builder is available from {@link PropertyFactory#booleanProperty(String)} and its overloads. + * This class will be removed in 7.0.0. */ +@Deprecated public final class BooleanProperty extends AbstractSingleValueProperty { /** @@ -26,8 +29,9 @@ public final class BooleanProperty extends AbstractSingleValueProperty * @param defaultBoolStr String representing the default value. * @param theUIOrder UI order * - * @deprecated will be removed in 7.0.0 + * @deprecated Use {@link PropertyFactory#booleanProperty(String)} or its overloads. */ + @Deprecated public BooleanProperty(String theName, String theDescription, String defaultBoolStr, float theUIOrder) { this(theName, theDescription, Boolean.valueOf(defaultBoolStr), theUIOrder, false); } @@ -46,7 +50,10 @@ public final class BooleanProperty extends AbstractSingleValueProperty * @param theDescription Description * @param defaultValue Default value * @param theUIOrder UI order + * + * @deprecated Use {@link PropertyFactory#booleanProperty(String)} or its overloads. */ + @Deprecated public BooleanProperty(String theName, String theDescription, boolean defaultValue, float theUIOrder) { this(theName, theDescription, defaultValue, theUIOrder, false); } @@ -74,11 +81,19 @@ public final class BooleanProperty extends AbstractSingleValueProperty } + /** + * @deprecated Use {@link PropertyFactory#booleanProperty(String)} or its overloads. + */ + @Deprecated public static BooleanPBuilder named(String name) { return new BooleanPBuilder(name); } + /** + * @deprecated Use {@link PropertyFactory#booleanProperty(String)} or its overloads. + */ + @Deprecated public static final class BooleanPBuilder extends SingleValuePropertyBuilder { private BooleanPBuilder(String name) { super(name);