* Create an instance of ClassDependencyBuilder that looks at the byte code and keeps
* the information for every class in this app
*
*/
if (types==null || Boolean.getBoolean("org.glassfish.web.parsing")) {
ClassDependencyBuilder classInfo = new ClassDependencyBuilder();
if (cl instanceof URLClassLoader) {
URLClassLoader ucl = (URLClassLoader) cl;
for(URL u : ucl.getURLs()) {
String path = u.getPath();
try {
if(path.endsWith(".jar")) {
JarFile jf = new JarFile(path);
try {
Enumeration<JarEntry> entries = jf.entries();
while(entries.hasMoreElements()) {
JarEntry anEntry = entries.nextElement();
if(anEntry.isDirectory())
continue;
if(!anEntry.getName().endsWith(".class"))
continue;
InputStream jarInputStream = null;
try {
jarInputStream = jf.getInputStream(anEntry);
int size = (int) anEntry.getSize();
byte[] classData = new byte[size];
for(int bytesRead = 0; bytesRead < size;) {
int r2 = jarInputStream.read(classData, bytesRead, size - bytesRead);
bytesRead += r2;
}
classInfo.loadClassData(classData);
} catch (Throwable t) {
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE,
"servletContainerInitializerUtil.classLoadingError",
new Object[] {