code: private <F extends FileDescriptor> F scanFile(MavenProjectDirectoryDescriptor projectDescriptor, File file, String path, Scope scope, Scanner scanner) {
          scanner.getContext().push(MavenProjectDirectoryDescriptor.class, projectDescriptor);
          try {
              return scanner.scan(file, path, scope);
          } finally {
              scanner.getContext().pop(MavenProjectDirectoryDescriptor.class);
          }
      }
docs: Scan a given file.
  
  <p>
  The current project is pushed to the context.
  </p>
  
  @param projectDescriptor
  The maven project descriptor.
  @param file
  The file.
  @param path
  The path.
  @param scope
  The scope.
  @param scanner
  The scanner.