class WorkerProcessCommandLine implements CommandLine {

  static File findAgentJarFile(final List<File> systemClasspath) {
    for (final File pathEntry : systemClasspath) {
      final File f = pathEntry.getParentFile();
      final File parentFile = f != null ? f : new File(".");

      final File[] children = parentFile.listFiles();

      if (children != null) {
        for (final File candidate : children) {
          if (isAgentJar(candidate.getName())) {
            return candidate;
          }
        }
      }
    }

    return null;
  }

  public  WorkerProcessCommandLine(final GrinderProperties properties,
                                  final Properties systemProperties,
                                  final String jvmArguments,
                                  final Directory workingDirectory);

}