code: public static Iterator<String> iterateClassnames(final File parentDirectory,
                                                     final Iterator<File> classFileIterator) {
      return new Iterator<String>(){
  
        @Override
        public boolean hasNext() {
          return classFileIterator == null ? false : classFileIterator.hasNext();
        }
  
        @Override
        public String next() {
          final File classFile = classFileIterator.next();
          try {
            // possible returns null
            return extractClassNameFromFile(parentDirectory, classFile);
          } catch (final IOException e) {
            throw new RuntimeException(e.getMessage());
          }
        }
  
        @Override
        public void remove() {
          classFileIterator.remove();
        }
      };
    }
docs: DANGEROUS call by reference