Class ServicesFiles

java.lang.Object
com.google.auto.service.processor.ServicesFiles

final class ServicesFiles extends Object
A helper class for reading and writing Services files.
  • Field Details

  • Constructor Details

    • ServicesFiles

      private ServicesFiles()
  • Method Details

    • getPath

      static String getPath(String serviceName)
      Returns an absolute path to a service file given the class name of the service.
      Parameters:
      serviceName - not null
      Returns:
      SERVICES_PATH + serviceName
    • readServiceFile

      static Set<String> readServiceFile(InputStream input) throws IOException
      Reads the set of service classes from a service file.
      Parameters:
      input - not null. Closed after use.
      Returns:
      a not null Set of service class names.
      Throws:
      IOException
    • writeServiceFile

      static void writeServiceFile(Collection<String> services, OutputStream output) throws IOException
      Writes the set of service class names to a service file.
      Parameters:
      output - not null. Not closed after use.
      services - a not null Collection of service class names.
      Throws:
      IOException