Class ServicesFiles
java.lang.Object
com.google.auto.service.processor.ServicesFiles
A helper class for reading and writing Services files.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static String
Returns an absolute path to a service file given the class name of the service.readServiceFile
(InputStream input) Reads the set of service classes from a service file.(package private) static void
writeServiceFile
(Collection<String> services, OutputStream output) Writes the set of service class names to a service file.
-
Field Details
-
SERVICES_PATH
- See Also:
-
-
Constructor Details
-
ServicesFiles
private ServicesFiles()
-
-
Method Details
-
getPath
Returns an absolute path to a service file given the class name of the service.- Parameters:
serviceName
- notnull
- Returns:
- SERVICES_PATH + serviceName
-
readServiceFile
Reads the set of service classes from a service file.- Parameters:
input
- notnull
. Closed after use.- Returns:
- a not
null Set
of service class names. - Throws:
IOException
-
writeServiceFile
Writes the set of service class names to a service file.- Parameters:
output
- notnull
. Not closed after use.services
- a notnull Collection
of service class names.- Throws:
IOException
-