code: protected boolean isCachedResultObsolete(CachedGeneratorResult cachedGeneratorResult, String typeName) {
  
      try {
        URL javaFileUrl = Thread.currentThread().getContextClassLoader()
            .getResource(typeName.replace('.', '/') + ".java");
        String protocol = javaFileUrl.getProtocol().toLowerCase();
        if ("file".equals(protocol)) {
          String urlString = URLDecoder.decode(javaFileUrl.getFile(), "UTF-8");
          File javaFile = new File(urlString);
          long lastModified = javaFile.lastModified();
          long timeGenerated = cachedGeneratorResult.getTimeGenerated();
          return (lastModified > timeGenerated);
        } else {
          throw new IllegalCaseException(protocol);
        }
      } catch (UnsupportedEncodingException e) {
        throw new IllegalStateException(e);
      }
    }
docs: This method determines whether a {@link CachedGeneratorResult} is obsolete or can be reused.
  
  @param cachedGeneratorResult is the {@link CachedGeneratorResult}.
  @param typeName is the full-qualified name of the {@link Class} to generate.
  @return {@code true} if the {@link CachedGeneratorResult} is obsolete and has to be re-generated, {@code false}
  otherwise (if it can be reused).