Skip to content

Commit

Permalink
Allow recipes within RefactorPlan to be accessed
Browse files Browse the repository at this point in the history
  • Loading branch information
SofiaBrittoSchwartz committed Aug 26, 2020
1 parent e2bbc7f commit 8538461
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rewrite-core/src/main/java/org/openrewrite/RefactorPlan.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public <T extends Tree, R extends RefactorVisitor<T>> R configure(R visitor, Ite
.reduce(visitor, (v2, recipe) -> recipe.configure(v2), (v1, v2) -> v1);
}

public Map<String, Recipe> getRecipesByName() {
return new HashMap<>(recipesByName);
}

@Nullable
public <S extends Style> S style(Class<S> styleClass, Iterable<String> recipes) {
return loadedRecipes(recipes).stream()
Expand Down

0 comments on commit 8538461

Please sign in to comment.