Package org.openrewrite.config
Class YamlResourceLoader
java.lang.Object
org.openrewrite.config.YamlResourceLoader
- All Implemented Interfaces:
ResourceLoader
-
Constructor Summary
ConstructorsConstructorDescriptionYamlResourceLoader
(InputStream yamlInput, URI source, Properties properties) Load a declarative recipe using the runtime classloaderYamlResourceLoader
(InputStream yamlInput, URI source, Properties properties, @Nullable ClassLoader classLoader) Load a declarative recipe, optionally using the specified classloaderYamlResourceLoader
(InputStream yamlInput, URI source, Properties properties, @Nullable ClassLoader classLoader, Collection<? extends ResourceLoader> dependencyResourceLoaders) Load a declarative recipe, optionally using the specified classloader and optionally including resource loaders for recipes from dependencies. -
Method Summary
Modifier and TypeMethodDescriptionlistRecipeDescriptors
(Collection<Recipe> externalRecipes, Map<String, List<Contributor>> recipeNamesToContributors, Map<String, List<RecipeExample>> recipeNamesToExamples)
-
Constructor Details
-
YamlResourceLoader
public YamlResourceLoader(InputStream yamlInput, URI source, Properties properties) throws UncheckedIOException Load a declarative recipe using the runtime classloader- Parameters:
yamlInput
- Declarative recipe yaml input streamsource
- Declarative recipe sourceproperties
- Placeholder properties- Throws:
UncheckedIOException
- On unexpected IOException
-
YamlResourceLoader
public YamlResourceLoader(InputStream yamlInput, URI source, Properties properties, @Nullable @Nullable ClassLoader classLoader) throws UncheckedIOException Load a declarative recipe, optionally using the specified classloader- Parameters:
yamlInput
- Declarative recipe yaml input streamsource
- Declarative recipe sourceproperties
- Placeholder propertiesclassLoader
- Optional classloader to use with jackson. If not specified, the runtime classloader will be used.- Throws:
UncheckedIOException
- On unexpected IOException
-
YamlResourceLoader
public YamlResourceLoader(InputStream yamlInput, URI source, Properties properties, @Nullable @Nullable ClassLoader classLoader, Collection<? extends ResourceLoader> dependencyResourceLoaders) throws UncheckedIOException Load a declarative recipe, optionally using the specified classloader and optionally including resource loaders for recipes from dependencies.- Parameters:
yamlInput
- Declarative recipe yaml input streamsource
- Declarative recipe sourceproperties
- Placeholder propertiesclassLoader
- Optional classloader to use with jackson. If not specified, the runtime classloader will be used.- Throws:
UncheckedIOException
- On unexpected IOException
-
-
Method Details
-
listRecipes
- Specified by:
listRecipes
in interfaceResourceLoader
-
listRecipeDescriptors
- Specified by:
listRecipeDescriptors
in interfaceResourceLoader
-
listRecipeDescriptors
public Collection<RecipeDescriptor> listRecipeDescriptors(Collection<Recipe> externalRecipes, Map<String, List<Contributor>> recipeNamesToContributors, Map<String, List<RecipeExample>> recipeNamesToExamples) -
listStyles
- Specified by:
listStyles
in interfaceResourceLoader
-
listCategoryDescriptors
- Specified by:
listCategoryDescriptors
in interfaceResourceLoader
-
listRecipeExamples
- Specified by:
listRecipeExamples
in interfaceResourceLoader
-
listContributors
- Specified by:
listContributors
in interfaceResourceLoader
-