java Programming Glossary: classdiscovery
How can I enumerate all classes in a package and add them to a List? http://stackoverflow.com/questions/176527/how-can-i-enumerate-all-classes-in-a-package-and-add-them-to-a-list String relPath pkgname.replace '.' ' ' System.out.println ClassDiscovery Package pkgname becomes Path relPath URL resource ClassLoader.getSystemClassLoader.. .getResource relPath System.out.println ClassDiscovery Resource resource if resource null throw new RuntimeException.. for relPath fullPath resource.getFile System.out.println ClassDiscovery FullPath resource try directory new File resource.toURI catch..
|