code: public boolean shouldScanFile(String path)
      {
          WindupJavaConfigurationModel configuration = getJavaConfigurationModel(getGraphContext());
          path = FilenameUtils.separatorsToUnix(path);
          for (PackageModel excludePackage : configuration.getExcludeJavaPackages())
          {
              String packageAsPath = excludePackage.getPackageName().replace(".", "/");
              if (path.contains(packageAsPath))
                  return false;
          }
  
          boolean shouldScan = true;
          for (PackageModel includePackage : configuration.getScanJavaPackages())
          {
              String packageAsPath = includePackage.getPackageName().replace(".", "/");
              if (path.contains(packageAsPath))
              {
                  shouldScan = true;
                  break;
              }
              else
              {
                  shouldScan = false;
              }
          }
          return shouldScan;
      }
docs: This is similar to {@link WindupJavaConfigurationService#shouldScanPackage(String)}, except that it expects to be given a file path (for
  example, "/path/to/file.class"). This will use a string.contains approach, as we cannot know for sure what type of path prefixes may exist
  before the package name part of the path.
  
  Also, this can only work reliably for class files, though it will generally work with java files if they are in package appropriate folders.