Skip to content

Commit

Permalink
Stabilise the preferences API
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuxel committed Nov 27, 2022
1 parent 0ceb675 commit 5dfc047
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
12 changes: 0 additions & 12 deletions src/main/java/juuxel/loomquiltflower/api/QuiltflowerExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,44 +34,32 @@ public interface QuiltflowerExtension {

/**
* {@return the Quiltflower decompilation preferences}
*
* <p>This method is experimental and may be removed in a minor release.
*/
@ApiStatus.Experimental
QuiltflowerPreferences getPreferences();

/**
* Configures Quiltflower decompilation preferences.
*
* <p>This method is experimental and may be removed in a minor release.
*
* @param action the configuration action
*/
@ApiStatus.Experimental
default void preferences(Action<QuiltflowerPreferences> action) {
action.execute(getPreferences());
}

/**
* Adds Quiltflower decompilation preferences.
*
* <p>This method is experimental and may be removed in a minor release.
*
* @param preferences the preferences as a map
*/
@ApiStatus.Experimental
default void preferences(Map<String, ?> preferences) {
preferences(p -> p.put(preferences));
}

/**
* Adds Quiltflower decompilation preferences.
*
* <p>This method is experimental and may be removed in a minor release.
*
* @param preferences the preferences as an array of key-value pairs
*/
@ApiStatus.Experimental
default void preferences(Pair<String, ?>... preferences) {
preferences(p -> p.put(preferences));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
/**
* Manages Quiltflower decompilation preferences.
*
* <p>This interface is experimental, and it or any contained methods may be removed in a minor release.
*
* @since 1.2.0
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface QuiltflowerPreferences {
/**
Expand Down Expand Up @@ -67,8 +64,6 @@ default void put(Map<String, ?> preferences) {
/**
* Adds Quiltflower decompilation preferences.
*
* <p>This method is experimental and may be removed in a minor release.
*
* @param preferences the preferences as an array of key-value pairs
*/
@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 5dfc047

Please sign in to comment.