From 5070aef0ca6b74bddc608c583a7c1e4f64536494 Mon Sep 17 00:00:00 2001 From: Martin Wittlinger Date: Sun, 28 Jan 2024 12:47:03 +0100 Subject: [PATCH] refactor: Deprecate old javadoc classes (#5609) --- .../java/spoon/javadoc/internal/Javadoc.java | 17 ++++++++++------- .../spoon/javadoc/internal/JavadocBlockTag.java | 2 ++ .../javadoc/internal/JavadocDescription.java | 2 ++ .../internal/JavadocDescriptionElement.java | 2 ++ .../javadoc/internal/JavadocInlineTag.java | 2 ++ .../spoon/javadoc/internal/JavadocSnippet.java | 2 ++ 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/main/java/spoon/javadoc/internal/Javadoc.java b/src/main/java/spoon/javadoc/internal/Javadoc.java index dac54a782c3..f8f7a7290aa 100644 --- a/src/main/java/spoon/javadoc/internal/Javadoc.java +++ b/src/main/java/spoon/javadoc/internal/Javadoc.java @@ -26,13 +26,16 @@ import spoon.reflect.code.CtComment; /** -* The structured content of a single Javadoc comment. -* -*

It is composed by a description and a list of block tags. -* -*

An example would be the text contained in this very Javadoc comment. At the moment of this -* writing this comment does not contain any block tags (such as @see AnotherClass) -*/ + * The structured content of a single Javadoc comment. + * + *

It is composed by a description and a list of block tags. + * + *

An example would be the text contained in this very Javadoc comment. At the moment of this + * writing this comment does not contain any block tags (such as @see AnotherClass) + * + * @deprecated Use the new javadoc parser submodule, see Javadoc Parser. + */ +@Deprecated(forRemoval = true, since = "11.0.0") public class Javadoc implements Serializable { private static final long serialVersionUID = 1L; diff --git a/src/main/java/spoon/javadoc/internal/JavadocBlockTag.java b/src/main/java/spoon/javadoc/internal/JavadocBlockTag.java index e784fc8b60b..9e42c22a901 100644 --- a/src/main/java/spoon/javadoc/internal/JavadocBlockTag.java +++ b/src/main/java/spoon/javadoc/internal/JavadocBlockTag.java @@ -25,7 +25,9 @@ * *

Examples: @see AnotherClass @since v0.0.1 @author Jim O'Java * +* @deprecated Use the new javadoc parser submodule, see Javadoc Parser. */ +@Deprecated(forRemoval = true, since = "11.0.0") public class JavadocBlockTag implements Serializable { private static final long serialVersionUID = 1L; diff --git a/src/main/java/spoon/javadoc/internal/JavadocDescription.java b/src/main/java/spoon/javadoc/internal/JavadocDescription.java index fbddf795587..08e1313bea8 100644 --- a/src/main/java/spoon/javadoc/internal/JavadocDescription.java +++ b/src/main/java/spoon/javadoc/internal/JavadocDescription.java @@ -20,7 +20,9 @@ /** * A javadoc text, potentially containing inline tags. + * @deprecated Use the new javadoc parser submodule, see Javadoc Parser. */ + @Deprecated(forRemoval = true, since = "11.0.0") public class JavadocDescription implements Serializable { private static final long serialVersionUID = 1L; diff --git a/src/main/java/spoon/javadoc/internal/JavadocDescriptionElement.java b/src/main/java/spoon/javadoc/internal/JavadocDescriptionElement.java index 743a1d96daa..130b92a1d67 100644 --- a/src/main/java/spoon/javadoc/internal/JavadocDescriptionElement.java +++ b/src/main/java/spoon/javadoc/internal/JavadocDescriptionElement.java @@ -19,7 +19,9 @@ * *

So for example a text or {@link String} could be valid description * elements. +* @deprecated Use the new javadoc parser submodule, see Javadoc Parser. */ +@Deprecated(forRemoval = true, since = "11.0.0") public interface JavadocDescriptionElement { /** pretty-prints the Javadoc fragment */ String toText(); diff --git a/src/main/java/spoon/javadoc/internal/JavadocInlineTag.java b/src/main/java/spoon/javadoc/internal/JavadocInlineTag.java index e11dde27623..6e50a12b5e3 100644 --- a/src/main/java/spoon/javadoc/internal/JavadocInlineTag.java +++ b/src/main/java/spoon/javadoc/internal/JavadocInlineTag.java @@ -20,7 +20,9 @@ * An inline tag contained in a Javadoc description. * *

For example {@link String} +* @deprecated Use the new javadoc parser submodule, see Javadoc Parser. */ +@Deprecated(forRemoval = true, since = "11.0.0") public class JavadocInlineTag implements JavadocDescriptionElement, Serializable { private static final long serialVersionUID = 1L; diff --git a/src/main/java/spoon/javadoc/internal/JavadocSnippet.java b/src/main/java/spoon/javadoc/internal/JavadocSnippet.java index f82fd374671..5edd52d4587 100644 --- a/src/main/java/spoon/javadoc/internal/JavadocSnippet.java +++ b/src/main/java/spoon/javadoc/internal/JavadocSnippet.java @@ -21,7 +21,9 @@ * *

For example in A class totally unrelated to {@link String}, I swear! we would * have two snippets: one before and one after the inline tag ({@link String}). +* @deprecated Use the new javadoc parser submodule, see Javadoc Parser. */ +@Deprecated(forRemoval = true, since = "11.0.0") public class JavadocSnippet implements JavadocDescriptionElement, Serializable { private static final long serialVersionUID = 1L; private String text;