public final class ScanClassExtensions extends Object
ScanClassExtensions provides extension methods for the scan Class
objects| Constructor and Description |
|---|
ScanClassExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
equalsByClassName(Class<?> oneClass,
Class<?> otherClass)
Equal the given class objects by they qualified class names.
|
static String |
normalizeQualifiedClassName(String qualifiedClassname)
Normalizes the given full qualified class name.
|
static String |
normalizeSimpleClassName(String className)
Normalizes the given simple class name.
|
static Set<Class<?>> |
scanClassesFromPackage(File directory,
String packagePath)
Scan for classes in the given directory.
|
static Set<Class<?>> |
scanClassesFromPackage(File directory,
String packagePath,
boolean recursive)
Scan recursive for classes in the given directory.
|
static Set<Class<?>> |
scanClassNames(String packageName)
Scan class names from the given package name.
|
static Set<Class<?>> |
scanClassNames(String packageName,
boolean recursive)
Scan class names from the given package name.
|
public static boolean equalsByClassName(Class<?> oneClass, Class<?> otherClass)
oneClass - one class for equation by the qualified class name.otherClass - the other class for equation by the qualified class name.public static String normalizeQualifiedClassName(String qualifiedClassname)
qualifiedClassname - the full qualified class name to normalize.public static String normalizeSimpleClassName(String className)
className - the class name to normalize.public static Set<Class<?>> scanClassesFromPackage(File directory, String packagePath) throws ClassNotFoundException
directory - the directorypackagePath - the package pathClassNotFoundException - occurs if a given class cannot be located by the specified class loaderpublic static Set<Class<?>> scanClassesFromPackage(File directory, String packagePath, boolean recursive) throws ClassNotFoundException
directory - the directorypackagePath - the package pathrecursive - the recursiveClassNotFoundException - is thrown if a class in the given path cannot be located.public static Set<Class<?>> scanClassNames(String packageName) throws IOException, ClassNotFoundException
packageName - the package nameIOException - Signals that an I/O exception has occurred.ClassNotFoundException - is thrown if a class in the given path cannot be located.public static Set<Class<?>> scanClassNames(String packageName, boolean recursive) throws IOException, ClassNotFoundException
packageName - the package namerecursive - the recursive flagIOException - Signals that an I/O exception has occurred.ClassNotFoundException - is thrown if a class in the given path cannot be located.Copyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.