Tabnine Logo
ServiceLoader.load
Code IndexAdd Tabnine to your IDE (free)

How to use
load
method
in
org.jboss.arquillian.container.test.spi.util.ServiceLoader

Best Java code snippets using org.jboss.arquillian.container.test.spi.util.ServiceLoader.load (Showing top 8 results out of 315)

origin: arquillian/arquillian-core

  public ServiceLoader<AutomaticDeployment> find() {
    return ServiceLoader.load(AutomaticDeployment.class);
  }
};
origin: org.jboss.arquillian.container/arquillian-container-test-impl-base

  public ServiceLoader<AutomaticDeployment> find() {
    return ServiceLoader.load(AutomaticDeployment.class);
  }
};
origin: org.jboss.arquillian.container/arquillian-container-test-spi

/**
 * Creates a new service loader for the given service type, using the current
 * thread's context class loader.
 * <p>
 * An invocation of this convenience method of the form
 * <p>
 * {@code ServiceLoader.load(service)</code>}
 * <p>
 * is equivalent to
 * <p>
 * <code>ServiceLoader.load(service,
 * Thread.currentThread().getContextClassLoader())</code>
 *
 * @param service
 *     The interface or abstract class representing the service
 *
 * @return A new service loader
 */
public static <S> ServiceLoader<S> load(Class<S> service) {
  return load(service, Thread.currentThread().getContextClassLoader());
}
origin: arquillian/arquillian-core

/**
 * Creates a new service loader for the given service type, using the current
 * thread's context class loader.
 * <p>
 * An invocation of this convenience method of the form
 * <p>
 * {@code ServiceLoader.load(service)</code>}
 * <p>
 * is equivalent to
 * <p>
 * <code>ServiceLoader.load(service,
 * Thread.currentThread().getContextClassLoader())</code>
 *
 * @param service
 *     The interface or abstract class representing the service
 *
 * @return A new service loader
 */
public static <S> ServiceLoader<S> load(Class<S> service) {
  return load(service, Thread.currentThread().getContextClassLoader());
}
origin: org.wildfly.arquillian/wildfly-arquillian-protocol-jmx

ArquillianConfig(Set<String> testClasses, String deploymentUnitName) {
  this.serviceName = getServiceName(deploymentUnitName);
  this.testClasses.addAll(testClasses);
  for(ArquillianConfigServiceCustomizer customizer : ServiceLoader.load(ArquillianConfigServiceCustomizer.class)) {
    serviceCustomizers.add(customizer);
  }
}
origin: wildfly/wildfly-arquillian

ArquillianConfig(Set<String> testClasses, String deploymentUnitName) {
  this.serviceName = getServiceName(deploymentUnitName);
  this.testClasses.addAll(testClasses);
  for(ArquillianConfigServiceCustomizer customizer : ServiceLoader.load(ArquillianConfigServiceCustomizer.class)) {
    serviceCustomizers.add(customizer);
  }
}
origin: org.jboss.arquillian.container/arquillian-container-test-spi

  /**
   * Dynamically loads an instance of a test runner.
   *
   * @return A Initialized TestRunner
   *
   * @throws IllegalStateException
   *     if multiple TestRunners found in classpath.
   */
  public static TestRunner getTestRunner(ClassLoader classLoader) {
    ServiceLoader<TestRunner> serviceLoader = ServiceLoader.load(TestRunner.class, classLoader);

    if (serviceLoader.getProviders().size() > 1) {
      throw new IllegalStateException("Multiple TestRunners found, only one allowed. Check your classpath");
    }

    return serviceLoader.iterator().next();
  }
}
origin: arquillian/arquillian-core

  /**
   * Dynamically loads an instance of a test runner.
   *
   * @return A Initialized TestRunner
   *
   * @throws IllegalStateException
   *     if multiple TestRunners found in classpath.
   */
  public static TestRunner getTestRunner(ClassLoader classLoader) {
    ServiceLoader<TestRunner> serviceLoader = ServiceLoader.load(TestRunner.class, classLoader);

    if (serviceLoader.getProviders().size() > 1) {
      throw new IllegalStateException("Multiple TestRunners found, only one allowed. Check your classpath");
    }

    return serviceLoader.iterator().next();
  }
}
org.jboss.arquillian.container.test.spi.utilServiceLoaderload

Javadoc

Creates a new service loader for the given service type, using the current thread's context class loader.

An invocation of this convenience method of the form

ServiceLoader.load(service)

is equivalent to

ServiceLoader.load(service, Thread.currentThread().getContextClassLoader())

Popular methods of ServiceLoader

  • iterator
    Lazily loads the available providers of this loader's service. The iterator returned by this method
  • <init>
  • createInstance
  • getProviders
  • reload
    Clear this loader's provider cache so that all providers will be reloaded. After invoking this metho

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now