package io.github.lukehutch.fastclasspathscanner.classloaderhandler;

import io.github.lukehutch.fastclasspathscanner.classloaderhandler.ClassLoaderHandler;
import io.github.lukehutch.fastclasspathscanner.scanner.ClasspathFinder;
import io.github.lukehutch.fastclasspathscanner.utils.LogNode;
import io.github.lukehutch.fastclasspathscanner.utils.ReflectionUtils;

public class WebsphereTraditionalClassLoaderHandler implements ClassLoaderHandler {

    public boolean handle(ClassLoader classloader, ClasspathFinder classpathFinder, LogNode log) throws Exception {
        for (Class<?> c = classloader.getClass(); c != null; c = c.getSuperclass()) {
            if (!"com.ibm.ws.classloader.CompoundClassLoader".equals(c.getName())) {
                continue;
            }
            String classpath = (String) ReflectionUtils.invokeMethod(classloader, "getClassPath");
            return classpathFinder.addClasspathElements(classpath, classloader, log);
        }
        return false;
    }

}

@@ -1,22 +1,121 @@
-package io.
+/*%0A * This file is part of FastClasspathScanner.%0A * %0A * Author: Sergey Bespalov%0A * %0A * Hosted at: https://
 github.
+com/
 luke
@@ -111,37 +111,38 @@
 ub.com/lukehutch
-.
+/
 fast
+-
 classpathscanner
@@ -138,43 +138,1176 @@
 path
+-
 scanner
-.classloaderhandler;%0A%0Aimport
+%0A * %0A * --%0A *%0A * The MIT License (MIT)%0A *%0A * Copyright (c) 2017 Sergey Bespalov%0A * %0A * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated%0A * documentation files (the %22Software%22), to deal in the Software without restriction, including without%0A * limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of%0A * the Software, and to permit persons to whom the Software is furnished to do so, subject to the following%0A * conditions:%0A * %0A * The above copyright notice and this permission notice shall be included in all copies or substantial%0A * portions of the Software.%0A * %0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT%0A * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO%0A * EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN%0A * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE%0A * OR OTHER DEALINGS IN THE SOFTWARE.%0A */%0Apackage
  io.
@@ -1366,28 +1366,10 @@
 dler
-.ClassLoaderHandler
 ;
+%0A
 %0Aimp
@@ -1658,16 +1658,30 @@
 dler %7B%0A%0A
+    @Override%0A
     publ
@@ -1698,16 +1698,22 @@
  handle(
+final 
 ClassLoa
@@ -1728,16 +1728,22 @@
 sloader,
+ final
  Classpa
@@ -1767,16 +1767,22 @@
 hFinder,
+ final
  LogNode
@@ -1786,16 +1786,28 @@
 ode log)
+%0A           
  throws 
@@ -2041,16 +2041,22 @@
         
+final 
 String c

Add copyright and license info