(URL jarUrl, Map<String, ResourceInfo> resInfos)
| 497 | } |
| 498 | |
| 499 | protected void scanJar(URL jarUrl, Map<String, ResourceInfo> resInfos) |
| 500 | throws IOException { |
| 501 | JarInputStream jarInput = new JarInputStream(jarUrl.openStream(), false); |
| 502 | JarEntry entry = null; |
| 503 | while((entry = jarInput.getNextJarEntry()) != null) { |
| 504 | String entryName = entry.getName(); |
| 505 | if(entryName != null && entryName.endsWith(".class")) { |
| 506 | final String className = |
| 507 | entryName.substring(0, entryName.length() - 6).replace('/', '.'); |
| 508 | if(!resInfos.containsKey(className)) { |
| 509 | ClassReader classReader = new ClassReader(jarInput); |
| 510 | ResourceInfo resInfo = new ResourceInfo(null, className, null); |
| 511 | ResourceInfoVisitor visitor = new ResourceInfoVisitor(resInfo); |
| 512 | |
| 513 | classReader.accept(visitor, ClassReader.SKIP_CODE |
| 514 | | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES); |
| 515 | if(visitor.isCreoleResource()) { |
| 516 | resInfos.put(className, resInfo); |
| 517 | } |
| 518 | } |
| 519 | } |
| 520 | } |
| 521 | |
| 522 | jarInput.close(); |
| 523 | } |
| 524 | |
| 525 | protected void fillInResInfos(List<ResourceInfo> incompleteResInfos, |
| 526 | List<String> allJars) throws IOException { |
no test coverage detected