protected void analyzeClass(Resource res) throws BuildException { log("Analyze class file " + res, Project.MSG_VERBOSE); try { asmAnalyser.analyseClass(res.getInputStream(), res.toString()); } catch (final BuildException be) { throw be; } catch (final Exception e) { e.printStackTrace(); throw new BuildException( "Failed to analyze class-file " + res + ", exception=" + e, getLocation()); } }
protected void analyzeJar(Resource res) throws BuildException { log("Analyze jar file " + res, Project.MSG_VERBOSE); try { final JarInputStream jarStream = new JarInputStream(res.getInputStream()); ZipEntry ze = jarStream.getNextEntry(); while (null != ze) { final String fileName = ze.getName(); if (fileName.endsWith(".class")) { log("Analyze jar class file " + fileName, Project.MSG_VERBOSE); asmAnalyser.analyseClass(jarStream, fileName); } ze = jarStream.getNextEntry(); } } catch (final Exception e) { e.printStackTrace(); throw new BuildException( "Failed to analyze class-file " + res + ", exception=" + e, getLocation()); } }