Class ServicesFiles
- java.lang.Object
-
- com.google.auto.service.processor.ServicesFiles
-
final class ServicesFiles extends java.lang.ObjectA helper class for reading and writing Services files.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSERVICES_PATH
-
Constructor Summary
Constructors Modifier Constructor Description privateServicesFiles()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.lang.StringgetPath(java.lang.String serviceName)Returns an absolute path to a service file given the class name of the service.(package private) static java.util.Set<java.lang.String>readServiceFile(java.io.InputStream input)Reads the set of service classes from a service file.(package private) static voidwriteServiceFile(java.util.Collection<java.lang.String> services, java.io.OutputStream output)Writes the set of service class names to a service file.
-
-
-
Field Detail
-
SERVICES_PATH
public static final java.lang.String SERVICES_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPath
static java.lang.String getPath(java.lang.String serviceName)
Returns an absolute path to a service file given the class name of the service.- Parameters:
serviceName- notnull- Returns:
- SERVICES_PATH + serviceName
-
readServiceFile
static java.util.Set<java.lang.String> readServiceFile(java.io.InputStream input) throws java.io.IOExceptionReads the set of service classes from a service file.- Parameters:
input- notnull. Closed after use.- Returns:
- a not
null Setof service class names. - Throws:
java.io.IOException
-
writeServiceFile
static void writeServiceFile(java.util.Collection<java.lang.String> services, java.io.OutputStream output) throws java.io.IOExceptionWrites the set of service class names to a service file.- Parameters:
output- notnull. Not closed after use.services- a notnull Collectionof service class names.- Throws:
java.io.IOException
-
-