Skip to content

Commit

Permalink
Add documentation on the option getters
Browse files Browse the repository at this point in the history
  • Loading branch information
sschr15 committed Aug 18, 2024
1 parent ade4079 commit 032e915
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/org/jetbrains/java/decompiler/api/DecompilerOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public int compareTo(@NotNull DecompilerOption decompilerOption) {
return id.compareTo(decompilerOption.id);
}

/**
* Get all decompiler options from all plugins and the core decompiler.
* @return A list of all decompiler options, sorted by plugin and id, with core decompiler options first.
*/
public static List<DecompilerOption> getAll() {
List<DecompilerOption> options = new ArrayList<>();

Expand Down Expand Up @@ -104,6 +108,11 @@ public static List<DecompilerOption> getAll() {
return options;
}

/**
* Get all decompiler options from all plugins and the core decompiler, grouped by plugin.
* Calling {@link Map#get} with {@code null} will return the core decompiler options.
* @return A map of plugins to their decompiler options, sorted by id within each plugin.
*/
public static Map<Plugin, List<DecompilerOption>> getAllByPlugin() {
Map<Plugin, List<DecompilerOption>> options = new HashMap<>();

Expand Down

0 comments on commit 032e915

Please sign in to comment.