code: @Override
      protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
          //
          // Check if class is in the loaded classes cache
          //
          Class<?> cachedClass = findLoadedClass(name);
          if (cachedClass != null) {
              if (resolve) {
                  resolveClass(cachedClass);
              }
              return cachedClass;
          }
  
          //
          // Check parent class loaders
          //
          for (int i = 0; i < parents.length; i++) {
              ClassLoader parent = parents[i];
              try {
                  Class<?> clazz = parent.loadClass(name);
                  if (resolve) {
                      resolveClass(clazz);
                  }
                  return clazz;
              } catch (ClassNotFoundException ignored) {
                  // this parent didn't have the class; try the next one
              }
          }
  
          throw new ClassNotFoundException(name);
      }
docs: {@inheritDoc}