Package org.apache.cxf.common.util
Class ClasspathScanner
- java.lang.Object
- 
- org.apache.cxf.common.util.ClasspathScanner
 
- 
 public class ClasspathScanner extends Object 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringALL_CLASS_FILESstatic StringALL_FILESstatic StringCLASSPATH_URL_SCHEMEstatic StringWILDCARD
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedClasspathScanner()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<Class<? extends Annotation>,Collection<Class<?>>>findClasses(String basePackage, Class<? extends Annotation>... annotations)Scans list of base packages for all classes marked with specific annotations.static Map<Class<? extends Annotation>,Collection<Class<?>>>findClasses(Collection<String> basePackages, Class<? extends Annotation>... annotations)Scans list of base packages for all classes marked with specific annotations.static Map<Class<? extends Annotation>,Collection<Class<?>>>findClasses(Collection<String> basePackages, List<Class<? extends Annotation>> annotations)Scans list of base packages for all classes marked with specific annotations.static Map<Class<? extends Annotation>,Collection<Class<?>>>findClasses(Collection<String> basePackages, List<Class<? extends Annotation>> annotations, ClassLoader loader)protected Map<Class<? extends Annotation>,Collection<Class<?>>>findClassesInternal(Collection<String> basePackages, List<Class<? extends Annotation>> annotations, ClassLoader loader)static List<URL>findResources(String basePackage, String extension)Scans list of base packages for all resources with the given extension.static List<URL>findResources(String basePackage, String extension, ClassLoader loader)Scans list of base packages for all resources with the given extension.static List<URL>findResources(Collection<String> basePackages, String extension)Scans list of base packages for all resources with the given extension.static List<URL>findResources(Collection<String> basePackages, String extension, ClassLoader loader)protected List<URL>findResourcesInternal(Collection<String> basePackages, String extension, ClassLoader loader)static Set<String>parsePackages(String packagesAsCsv)
 
- 
- 
- 
Field Detail- 
ALL_FILESpublic static final String ALL_FILES - See Also:
- Constant Field Values
 
 - 
ALL_CLASS_FILESpublic static final String ALL_CLASS_FILES - See Also:
- Constant Field Values
 
 - 
WILDCARDpublic static final String WILDCARD - See Also:
- Constant Field Values
 
 - 
CLASSPATH_URL_SCHEMEpublic static final String CLASSPATH_URL_SCHEME - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
findClasses@SafeVarargs public static Map<Class<? extends Annotation>,Collection<Class<?>>> findClasses(String basePackage, Class<? extends Annotation>... annotations) throws IOException, ClassNotFoundException Scans list of base packages for all classes marked with specific annotations.- Parameters:
- basePackage- base package
- annotations- annotations to discover
- Returns:
- all discovered classes grouped by annotations they belong too
- Throws:
- IOException- class metadata is not readable
- ClassNotFoundException- class not found
 
 - 
findClasses@SafeVarargs public static Map<Class<? extends Annotation>,Collection<Class<?>>> findClasses(Collection<String> basePackages, Class<? extends Annotation>... annotations) throws IOException, ClassNotFoundException Scans list of base packages for all classes marked with specific annotations.- Parameters:
- basePackages- list of base packages
- annotations- annotations to discover
- Returns:
- all discovered classes grouped by annotations they belong too
- Throws:
- IOException- class metadata is not readable
- ClassNotFoundException- class not found
 
 - 
findClassespublic static Map<Class<? extends Annotation>,Collection<Class<?>>> findClasses(Collection<String> basePackages, List<Class<? extends Annotation>> annotations) throws IOException, ClassNotFoundException Scans list of base packages for all classes marked with specific annotations.- Parameters:
- basePackages- list of base packages
- annotations- annotations to discover
- Returns:
- all discovered classes grouped by annotations they belong too
- Throws:
- IOException- class metadata is not readable
- ClassNotFoundException- class not found
 
 - 
findClassespublic static Map<Class<? extends Annotation>,Collection<Class<?>>> findClasses(Collection<String> basePackages, List<Class<? extends Annotation>> annotations, ClassLoader loader) throws IOException, ClassNotFoundException - Throws:
- IOException
- ClassNotFoundException
 
 - 
findClassesInternalprotected Map<Class<? extends Annotation>,Collection<Class<?>>> findClassesInternal(Collection<String> basePackages, List<Class<? extends Annotation>> annotations, ClassLoader loader) throws IOException, ClassNotFoundException - Throws:
- IOException
- ClassNotFoundException
 
 - 
findResourcespublic static List<URL> findResources(String basePackage, String extension) throws IOException Scans list of base packages for all resources with the given extension.- Parameters:
- basePackage- base package
- extension- the extension matching resources needs to have
- Returns:
- list of all discovered resource URLs
- Throws:
- IOException- resource is not accessible
 
 - 
findResourcespublic static List<URL> findResources(String basePackage, String extension, ClassLoader loader) throws IOException Scans list of base packages for all resources with the given extension.- Parameters:
- basePackage- base package
- extension- the extension matching resources needs to have
- Returns:
- list of all discovered resource URLs
- Throws:
- IOException- resource is not accessible
 
 - 
findResourcespublic static List<URL> findResources(Collection<String> basePackages, String extension) throws IOException Scans list of base packages for all resources with the given extension.- Parameters:
- basePackages- list of base packages
- extension- the extension matching resources needs to have
- Returns:
- list of all discovered resource URLs
- Throws:
- IOException- resource is not accessible
 
 - 
findResourcespublic static List<URL> findResources(Collection<String> basePackages, String extension, ClassLoader loader) throws IOException - Throws:
- IOException
 
 - 
findResourcesInternalprotected List<URL> findResourcesInternal(Collection<String> basePackages, String extension, ClassLoader loader) throws IOException - Throws:
- IOException
 
 
- 
 
-