forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate a documentation file for each config root and general config…
… items (non config group Fixes quarkusio#5144 Follows up quarkusio#5044
- Loading branch information
Showing
15 changed files
with
344 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
.../src/main/java/io/quarkus/annotation/processor/generate_doc/ConfigDocGeneratedOutput.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package io.quarkus.annotation.processor.generate_doc; | ||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
import io.quarkus.annotation.processor.Constants; | ||
|
||
public class ConfigDocGeneratedOutput { | ||
private final String fileName; | ||
private final boolean searchable; | ||
private final boolean hasAnchorPrefix; | ||
private final List<ConfigDocItem> configDocItems; | ||
|
||
public ConfigDocGeneratedOutput(String fileName, boolean searchable, List<ConfigDocItem> configDocItems, | ||
boolean hasAnchorPrefix) { | ||
this.fileName = fileName; | ||
this.searchable = searchable; | ||
this.configDocItems = configDocItems; | ||
this.hasAnchorPrefix = hasAnchorPrefix; | ||
} | ||
|
||
public String getFileName() { | ||
return fileName; | ||
} | ||
|
||
public boolean isSearchable() { | ||
return searchable; | ||
} | ||
|
||
public List<ConfigDocItem> getConfigDocItems() { | ||
return configDocItems; | ||
} | ||
|
||
public String getAnchorPrefix() { | ||
if (!hasAnchorPrefix) { | ||
return Constants.EMPTY; | ||
} | ||
|
||
String anchorPrefix = fileName; | ||
if (fileName.endsWith(Constants.ADOC_EXTENSION)) { | ||
anchorPrefix = anchorPrefix.substring(0, anchorPrefix.length() - 5); | ||
} | ||
|
||
return anchorPrefix + "_"; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
ConfigDocGeneratedOutput that = (ConfigDocGeneratedOutput) o; | ||
return Objects.equals(fileName, that.fileName); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(fileName); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ConfigItemsOutput{" + | ||
"fileName='" + fileName + '\'' + | ||
", searchable=" + searchable + | ||
", configDocItems=" + configDocItems + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.