Package org.openrewrite.config
Class ClasspathScanningLoader
- java.lang.Object
-
- org.openrewrite.config.ClasspathScanningLoader
-
- All Implemented Interfaces:
ResourceLoader
public class ClasspathScanningLoader extends java.lang.Object implements ResourceLoader
-
-
Constructor Summary
Constructors Constructor Description ClasspathScanningLoader(java.nio.file.Path jar, java.util.Properties properties, java.lang.ClassLoader classLoader)ClasspathScanningLoader(java.util.Properties properties, java.lang.ClassLoader classLoader)Construct a ClasspathScanningLoader scans the provided classload for recipesClasspathScanningLoader(java.util.Properties properties, java.lang.String[] acceptPackages)Construct a ClasspathScanningLoader scans the runtime classpath of the current java process for recipes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<CategoryDescriptor>listCategoryDescriptors()java.util.Collection<RecipeDescriptor>listRecipeDescriptors()java.util.Collection<RecipeExample>listRecipeExamples()java.util.Collection<Recipe>listRecipes()java.util.Collection<NamedStyles>listStyles()
-
-
-
Constructor Detail
-
ClasspathScanningLoader
public ClasspathScanningLoader(java.util.Properties properties, java.lang.String[] acceptPackages)Construct a ClasspathScanningLoader scans the runtime classpath of the current java process for recipes- Parameters:
properties- Yaml placeholder propertiesacceptPackages- Limit scan to specified packages
-
ClasspathScanningLoader
public ClasspathScanningLoader(java.util.Properties properties, java.lang.ClassLoader classLoader)Construct a ClasspathScanningLoader scans the provided classload for recipes- Parameters:
properties- Yaml placeholder propertiesclassLoader- Limit scan to classes loadable by this classloader
-
ClasspathScanningLoader
public ClasspathScanningLoader(java.nio.file.Path jar, java.util.Properties properties, java.lang.ClassLoader classLoader)
-
-
Method Detail
-
listRecipes
public java.util.Collection<Recipe> listRecipes()
- Specified by:
listRecipesin interfaceResourceLoader
-
listRecipeDescriptors
public java.util.Collection<RecipeDescriptor> listRecipeDescriptors()
- Specified by:
listRecipeDescriptorsin interfaceResourceLoader
-
listCategoryDescriptors
public java.util.Collection<CategoryDescriptor> listCategoryDescriptors()
- Specified by:
listCategoryDescriptorsin interfaceResourceLoader
-
listStyles
public java.util.Collection<NamedStyles> listStyles()
- Specified by:
listStylesin interfaceResourceLoader
-
listRecipeExamples
public java.util.Collection<RecipeExample> listRecipeExamples()
- Specified by:
listRecipeExamplesin interfaceResourceLoader
-
-