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.YamlResourceLoader(InputStream yamlInput, URI source, Properties properties, @Nullable ClassLoader classLoader, Collection<? extends ResourceLoader> dependencyResourceLoaders, Consumer<com.fasterxml.jackson.databind.ObjectMapper> mapperCustomizer) 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.dependencyResourceLoaders- Optional resource loaders for recipes from dependencies- Throws:
UncheckedIOException- On unexpected IOException
-
YamlResourceLoader
public YamlResourceLoader(InputStream yamlInput, URI source, Properties properties, @Nullable @Nullable ClassLoader classLoader, Collection<? extends ResourceLoader> dependencyResourceLoaders, Consumer<com.fasterxml.jackson.databind.ObjectMapper> mapperCustomizer) 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.dependencyResourceLoaders- Optional resource loaders for recipes from dependenciesmapperCustomizer- Customizer for the ObjectMapper- Throws:
UncheckedIOException- On unexpected IOException
-
-
Method Details
-
listRecipes
- Specified by:
listRecipesin interfaceResourceLoader
-
listRecipeDescriptors
- Specified by:
listRecipeDescriptorsin interfaceResourceLoader
-
listRecipeDescriptors
public Collection<RecipeDescriptor> listRecipeDescriptors(Collection<Recipe> externalRecipes, Map<String, List<Contributor>> recipeNamesToContributors, Map<String, List<RecipeExample>> recipeNamesToExamples) -
listStyles
- Specified by:
listStylesin interfaceResourceLoader
-
listCategoryDescriptors
- Specified by:
listCategoryDescriptorsin interfaceResourceLoader
-
listRecipeExamples
- Specified by:
listRecipeExamplesin interfaceResourceLoader
-
listContributors
- Specified by:
listContributorsin interfaceResourceLoader
-