Package org.testng.remote.support
Class ServiceLoaderHelper
- java.lang.Object
-
- org.testng.remote.support.ServiceLoaderHelper
-
public final class ServiceLoaderHelper extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateServiceLoaderHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidfail(java.lang.Class<?> service, java.lang.String msg)private static voidfail(java.lang.Class<?> service, java.net.URL u, int line, java.lang.String msg)static RemoteTestNGFactorygetFirst(Version version)static RemoteTestNGFactorygetFirstQuietly(java.lang.String version)static RemoteTestNGFactorygetFirstQuietly(Version version)Get the first RemoteTestNGFactory on classpath.private static intparseLine(java.lang.Class<?> service, java.net.URL u, java.io.BufferedReader r, int lc, java.util.List<java.lang.String> names)
-
-
-
Method Detail
-
getFirst
public static RemoteTestNGFactory getFirst(Version version)
-
getFirstQuietly
public static RemoteTestNGFactory getFirstQuietly(java.lang.String version)
-
getFirstQuietly
public static RemoteTestNGFactory getFirstQuietly(Version version)
Get the first RemoteTestNGFactory on classpath.this implementation is diff with
getFirst(Version)that it scans the JARs on the classpath, and parse the services file manually.- Parameters:
version-- Returns:
- Throws:
org.testng.TestNGException- if not found
-
parseLine
private static int parseLine(java.lang.Class<?> service, java.net.URL u, java.io.BufferedReader r, int lc, java.util.List<java.lang.String> names) throws java.io.IOException, java.util.ServiceConfigurationError- Throws:
java.io.IOExceptionjava.util.ServiceConfigurationError
-
fail
private static void fail(java.lang.Class<?> service, java.lang.String msg) throws java.util.ServiceConfigurationError- Throws:
java.util.ServiceConfigurationError
-
fail
private static void fail(java.lang.Class<?> service, java.net.URL u, int line, java.lang.String msg) throws java.util.ServiceConfigurationError- Throws:
java.util.ServiceConfigurationError
-
-