annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/AbstractClassFinder.java
protected void processClass(String className, InputStream classFileStream, ClassVisitor visitor)
   {

      // skip Java 9 module metadata class files
      if (className.equals("module-info")) return ;

      // bytecode check is only performed if the InputStream is available
      if (classFileStream != null)
      {

         // we must take care of IOExceptions thrown by ByteCodeAnnotationFilter
         try
         {

            // call bytecode filter
            boolean shouldScanClass = byteCodeFilter.accept(classFileStream);

            // No annotations -> abort
            if (!shouldScanClass)
            {
               return;
            }

            // filter says we should scan the class
            if (log.isDebugEnabled())
            {
               log.debug("Bytecode filter recommends to scan class: " + className);
            }

         }
         catch (IOException e)
         {
            if (log.isDebugEnabled())
            {
               log.debug("Failed to parse class file: " + className, e);
            }
         }
      }

      try
      {
         // request this class from the ClassLoader
         Class<?> clazz = Class.forName(className, false, classLoader);

         // call handler
         visitor.visit(clazz);

      }
      catch (NoClassDefFoundError e)
      {
         // reference to another class unknown to the classloader
         log.debug("Could not load class '" + className + "': " + e.toString());
      }
      catch (ClassNotFoundException e)
      {
         // should no happen, because we found the class on the classpath
         throw new IllegalStateException("Unable to load class: " + className, e);
      }

   }
protected void processClass(String className, InputStream classFileStream, ClassVisitor visitor)
   {

      // skip Java 9 module metadata class files
      if (className.equals("module-info")) return ;

      // bytecode check is only performed if the InputStream is available
      if (classFileStream != null)
      {

         // we must take care of IOExceptions thrown by ByteCodeAnnotationFilter
         try
         {

            // call bytecode filter
            boolean shouldScanClass = byteCodeFilter.accept(classFileStream);

            // No annotations -> abort
            if (!shouldScanClass)
            {
               return;
            }

            // filter says we should scan the class
            if (log.isDebugEnabled())
            {
               log.debug("Bytecode filter recommends to scan class: " + className);
            }

         }
         catch (IOException e)
         {
            if (log.isDebugEnabled())
            {
               log.debug("Failed to parse class file: " + className, e);
            }
         }
      }

      try
      {
         // request this class from the ClassLoader
         Class<?> clazz = Class.forName(className, false, classLoader);

         // call handler
         visitor.visit(clazz);

      }
      catch (NoClassDefFoundError e)
      {
         // reference to another class unknown to the classloader
         log.debug("Could not load class '" + className + "': " + e.toString());
      }
      catch (ClassNotFoundException e)
      {
         // should no happen, because we found the class on the classpath
         throw new IllegalStateException("Unable to load class: " + className, e);
      }

   }
<p>
Handle a single class to process. This method should only be called if the class name is accepted by the
{@link PackageFilter}.
</p>
<p>
If <code>classFileStream</code> is not <code>null</code> the method will first try to check whether the class
files may contain annotations by scanning it with the {@link ByteCodeFilter}. If no {@link InputStream} is
supplied, this check will be skipped. After that the method will create an instance of the class and then call
{@link ClassVisitor#visit(Class, org.ocpsoft.prettyfaces.annotation.PrettyConfig)}.
</p>
<p>
Please not the the called of this method is responsible to close the supplied {@link InputStream}!
</p>

@param className The FQCN of the class
@param classFileStream The Java class file of the class (may be <code>null</code>)
@param visitor the visitor