build-tools version specific ServiceLoader helper.
| Type | Name and description |
|---|---|
ServiceLoader<T> |
getServiceLoader(Service<T> serviceType)Returns a newly allocated or existing ServiceLoader instance for the passed com.android.builder.core.BuildToolsServiceLoader.Service type in the context of the build-tools version this instance was created for. |
com.google.common.base.Optional<T> |
getSingleService(com.android.utils.ILogger logger, Service<T> serviceType)Return the first service instance for the requested service type or com.google.common.base.Optional#absent() if none exist. |
Returns a newly allocated or existing ServiceLoader instance for the passed com.android.builder.core.BuildToolsServiceLoader.Service type in the context of the build-tools version this instance was created for.
serviceType - the requested service type encapsulation. - the type of serviceReturn the first service instance for the requested service type or com.google.common.base.Optional#absent() if none exist.
logger - to log resolution.serviceType - the requested service type encapsulation. - the requested service class type.