Skip to content

Commit

Permalink
Merge pull request plantuml#1619 from The-Lum/ImproveDoc
Browse files Browse the repository at this point in the history
docs: improve `@deprecated` description
  • Loading branch information
arnaudroques authored Dec 4, 2023
2 parents 1899280 + de5d791 commit 6c593c4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/net/sourceforge/plantuml/Option.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public 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) {
Expand Down
15 changes: 15 additions & 0 deletions src/net/sourceforge/plantuml/SourceStringReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ public SourceStringReader(Defines defines, String source, Charset charset, List<
}
}

/**
* @deprecated Use {@link #outputImage(OutputStream)} instead
*/
@Deprecated
public String generateImage(OutputStream os) throws IOException {
return outputImage(os).getDescription();
Expand All @@ -116,6 +119,9 @@ public DiagramDescription outputImage(OutputStream os) throws IOException {
}

// ::comment when __CORE__
/**
* @deprecated Use {@link #outputImage(SFile)} instead
*/
@Deprecated
public String generateImage(SFile f) throws IOException {
return outputImage(f).getDescription();
Expand All @@ -128,6 +134,9 @@ public DiagramDescription outputImage(SFile f) throws IOException {
}
// ::done

/**
* @deprecated Use {@link #outputImage(OutputStream, FileFormatOption)} instead
*/
@Deprecated
public String generateImage(OutputStream os, FileFormatOption fileFormatOption) throws IOException {
return outputImage(os, fileFormatOption).getDescription();
Expand All @@ -137,6 +146,9 @@ public DiagramDescription outputImage(OutputStream os, FileFormatOption fileForm
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();
Expand All @@ -146,6 +158,9 @@ public DiagramDescription outputImage(OutputStream os, int numImage) throws IOEx
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();
Expand Down
5 changes: 4 additions & 1 deletion src/net/sourceforge/plantuml/core/UmlSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ public IteratorCounter2 iterator2() {
// return Collections.unmodifiableCollection(rawSource).iterator();
// }


/**
* @deprecated Use {@link #getPlainString(String)} instead,
* like <code>getPlainString("\n")</code>
*/
@Deprecated()
public String getPlainString() {
return getPlainString("\n");
Expand Down

0 comments on commit 6c593c4

Please sign in to comment.