Package com.axelor.meta
Class MetaScanner
- java.lang.Object
-
- com.axelor.meta.MetaScanner
-
public final class MetaScanner extends Object
This class provides some utility methods to scan class path for resources/classes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<URL>findAll(String pattern)Find all resources matched by the given pattern.static List<URL>findAll(String module, String directory, String pattern)Find all resources within a directory of the given module matching the given pattern.static List<Properties>findModuleProperties()Find module properties within the class paths.static <T> ClassFinder<T>findSubTypesOf(Class<T> type)Delegates toReflections.findSubTypesOf(Class)but searches within module paths only.static <T> ClassFinder<T>findSubTypesOf(String module, Class<T> type)Same asfindSubTypesOf(Class)but searches only within given module.
-
-
-
Method Detail
-
findModuleProperties
public static List<Properties> findModuleProperties()
Find module properties within the class paths.- Returns:
- list of module properties
-
findAll
public static List<URL> findAll(String pattern)
Find all resources matched by the given pattern.- Parameters:
pattern- the resource name pattern to match- Returns:
- list of resources matched
-
findAll
public static List<URL> findAll(String module, String directory, String pattern)
Find all resources within a directory of the given module matching the given pattern.- Parameters:
module- the module namedirectory- the resource directory namepattern- the resource name pattern to match- Returns:
- list of resources matched
-
findSubTypesOf
public static <T> ClassFinder<T> findSubTypesOf(Class<T> type)
Delegates toReflections.findSubTypesOf(Class)but searches within module paths only.- See Also:
Reflections.findSubTypesOf(Class)
-
findSubTypesOf
public static <T> ClassFinder<T> findSubTypesOf(String module, Class<T> type)
Same asfindSubTypesOf(Class)but searches only within given module.- See Also:
findSubTypesOf(Class)
-
-