class ProcessControllerFactory {

  public boolean isAttachAPIFound() {
    if (disableAttachApi) {
      return false;
    }
    boolean found = false;
    try {
      final Class<?> virtualMachineClass = Class.forName("com.sun.tools.attach.spi.AttachProvider");
      if (virtualMachineClass != null) {
        Method providersMethod = virtualMachineClass.getMethod("providers");
        providersMethod.invoke(virtualMachineClass);
        found = true;
      }
    } catch (ClassNotFoundException | IllegalAccessException | InvocationTargetException
        | NoSuchMethodException | ServiceConfigurationError ignore) {
    }
    return found;
  }

  public  ProcessControllerFactory();

}