code: public boolean isAllowed(String classname) {
          Objects.requireNonNull(classname);
  
          if (!restrictedClassnames.isEmpty()) {
              for (String restrictedClassname : restrictedClassnames) {
                  if (classname.startsWith(restrictedClassname)) {
                      return false;
                  }
              }
          }
          if (!allowedClassnames.isEmpty()) {
              for (String allowedClassname : allowedClassnames) {
                  if (classname.startsWith(allowedClassname)) {
                      return true;
                  }
              }
              return false;
          }
          return true;
      }
docs: Tells whether or not the given classname is allowed, thus can be loaded.
  
  @param classname the classname to check.
  @return {@code true} if the given classname is allowed, {@code false} otherwise.
  @throws NullPointerException if the {@code classname} is {@code null}.