public class ClassFinder extends AbstractFinder
AbstractFinder.Annotatable, AbstractFinder.AnnotationInfo, AbstractFinder.ClassInfo, AbstractFinder.FieldInfo, AbstractFinder.Info, AbstractFinder.InfoBuildingVisitor, AbstractFinder.MethodInfo, AbstractFinder.PackageInfo| Modifier and Type | Field and Description |
|---|---|
private java.lang.ClassLoader |
classLoader |
classInfos, originalInfos| Constructor and Description |
|---|
ClassFinder(java.lang.Class<?>... classes) |
ClassFinder(java.lang.ClassLoader classLoader)
Creates a ClassFinder that will search the urls in the specified classloader
excluding the urls in the classloader's parent.
|
ClassFinder(java.lang.ClassLoader classLoader,
boolean excludeParent)
Creates a ClassFinder that will search the urls in the specified classloader.
|
ClassFinder(java.lang.ClassLoader classLoader,
java.lang.ClassLoader exclude)
Creates a ClassFinder that will search the urls in the specified classloader excluding
the urls in the 'exclude' classloader.
|
ClassFinder(java.lang.ClassLoader classLoader,
java.util.Collection<java.net.URL> urls) |
ClassFinder(java.lang.ClassLoader classLoader,
java.net.URL url) |
ClassFinder(java.util.List<java.lang.Class<?>> classes) |
| Modifier and Type | Method and Description |
|---|---|
private java.util.List<java.lang.String> |
file(java.net.URL location) |
protected java.net.URL |
getResource(java.lang.String className) |
private static java.util.Collection<java.net.URL> |
getUrls(java.lang.ClassLoader classLoader,
boolean excludeParent) |
private static java.util.Collection<java.net.URL> |
getUrls(java.lang.ClassLoader classLoader,
java.lang.ClassLoader excludeParent) |
private java.util.List<java.lang.String> |
jar(java.util.jar.JarInputStream jarStream) |
private java.util.List<java.lang.String> |
jar(java.net.URL location) |
protected java.lang.Class<?> |
loadClass(java.lang.String fixedName) |
private void |
scanDir(java.io.File dir,
java.util.List<java.lang.String> classNames,
java.lang.String packageName) |
findAnnotatedClasses, findAnnotatedConstructors, findAnnotatedFields, findAnnotatedMethods, findAnnotatedPackages, findClassesInPackage, findImplementations, findInheritedAnnotatedClasses, findMetaAnnotatedClasses, findMetaAnnotatedFields, findMetaAnnotatedMethods, findSubclasses, getAnnotatedClassNames, getAnnotationInfos, getClassesNotLoaded, isAnnotationPresent, link, readClassDef, readClassDef, readClassDef, readClassDefpublic ClassFinder(java.lang.ClassLoader classLoader)
throws java.lang.Exception
classLoader - source of classes to scanjava.lang.Exception - if something goes wrongpublic ClassFinder(java.lang.ClassLoader classLoader,
boolean excludeParent)
throws java.lang.Exception
classLoader - source of classes to scanexcludeParent - Allegedly excludes classes from parent classloader, whatever that might meanjava.lang.Exception - if something goes wrong.public ClassFinder(java.lang.ClassLoader classLoader,
java.lang.ClassLoader exclude)
throws java.lang.Exception
classLoader - source of classes to scanexclude - source of classes to exclude from scanningjava.lang.Exception - if something goes wrongpublic ClassFinder(java.lang.ClassLoader classLoader,
java.net.URL url)
public ClassFinder(java.lang.ClassLoader classLoader,
java.util.Collection<java.net.URL> urls)
public ClassFinder(java.lang.Class<?>... classes)
public ClassFinder(java.util.List<java.lang.Class<?>> classes)
private static java.util.Collection<java.net.URL> getUrls(java.lang.ClassLoader classLoader,
boolean excludeParent)
throws java.io.IOException
java.io.IOExceptionprivate static java.util.Collection<java.net.URL> getUrls(java.lang.ClassLoader classLoader,
java.lang.ClassLoader excludeParent)
throws java.io.IOException
java.io.IOExceptionprotected java.net.URL getResource(java.lang.String className)
getResource in class AbstractFinderprotected java.lang.Class<?> loadClass(java.lang.String fixedName)
throws java.lang.ClassNotFoundException
loadClass in class AbstractFinderjava.lang.ClassNotFoundExceptionprivate java.util.List<java.lang.String> file(java.net.URL location)
private void scanDir(java.io.File dir,
java.util.List<java.lang.String> classNames,
java.lang.String packageName)
private java.util.List<java.lang.String> jar(java.net.URL location)
throws java.io.IOException
java.io.IOExceptionprivate java.util.List<java.lang.String> jar(java.util.jar.JarInputStream jarStream)
throws java.io.IOException
java.io.IOException