From de5d791eb42563595065c9283d8b12f1da2dda08 Mon Sep 17 00:00:00 2001 From: The-Lum <86879521+The-Lum@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:23:17 +0000 Subject: [PATCH] docs: improve `@deprecated` description --- src/net/sourceforge/plantuml/Option.java | 3 +++ .../sourceforge/plantuml/SourceStringReader.java | 15 +++++++++++++++ src/net/sourceforge/plantuml/core/UmlSource.java | 5 ++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/net/sourceforge/plantuml/Option.java b/src/net/sourceforge/plantuml/Option.java index 2f1db45a0..31ad4bc7b 100644 --- a/src/net/sourceforge/plantuml/Option.java +++ b/src/net/sourceforge/plantuml/Option.java @@ -112,6 +112,9 @@ public class Option { private FileFormatOption fileFormatOption = new FileFormatOption(FileFormat.PNG); + /** + * @deprecated Use {@link #setFileFormatOption(FileFormatOption)} instead + */ @Deprecated @ApiWarning(willBeRemoved = "in next major release") final public void setFileFormat(FileFormat fileFormat) { diff --git a/src/net/sourceforge/plantuml/SourceStringReader.java b/src/net/sourceforge/plantuml/SourceStringReader.java index 32e7f5ace..e73c1f577 100644 --- a/src/net/sourceforge/plantuml/SourceStringReader.java +++ b/src/net/sourceforge/plantuml/SourceStringReader.java @@ -106,6 +106,9 @@ public class SourceStringReader { } } + /** + * @deprecated Use {@link #outputImage(OutputStream)} instead + */ @Deprecated public String generateImage(OutputStream os) throws IOException { return outputImage(os).getDescription(); @@ -116,6 +119,9 @@ public class SourceStringReader { } // ::comment when __CORE__ + /** + * @deprecated Use {@link #outputImage(SFile)} instead + */ @Deprecated public String generateImage(SFile f) throws IOException { return outputImage(f).getDescription(); @@ -128,6 +134,9 @@ public class SourceStringReader { } // ::done + /** + * @deprecated Use {@link #outputImage(OutputStream, FileFormatOption)} instead + */ @Deprecated public String generateImage(OutputStream os, FileFormatOption fileFormatOption) throws IOException { return outputImage(os, fileFormatOption).getDescription(); @@ -137,6 +146,9 @@ public class SourceStringReader { return outputImage(os, 0, fileFormatOption); } + /** + * @deprecated Use {@link #outputImage(OutputStream, int)} instead + */ @Deprecated public String generateImage(OutputStream os, int numImage) throws IOException { return outputImage(os, numImage).getDescription(); @@ -146,6 +158,9 @@ public class SourceStringReader { return outputImage(os, numImage, new FileFormatOption(FileFormat.PNG)); } + /** + * @deprecated Use {@link #outputImage(OutputStream, int, FileFormatOption)} instead + */ @Deprecated public String generateImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException { return outputImage(os, numImage, fileFormatOption).getDescription(); diff --git a/src/net/sourceforge/plantuml/core/UmlSource.java b/src/net/sourceforge/plantuml/core/UmlSource.java index 97b5ccc7b..0dacdc5ef 100755 --- a/src/net/sourceforge/plantuml/core/UmlSource.java +++ b/src/net/sourceforge/plantuml/core/UmlSource.java @@ -158,7 +158,10 @@ final public class UmlSource { // return Collections.unmodifiableCollection(rawSource).iterator(); // } - + /** + * @deprecated Use {@link #getPlainString(String)} instead, + * like getPlainString("\n") + */ @Deprecated() public String getPlainString() { return getPlainString("\n");