congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
FactoryRegistry.getClassLoaders
Code IndexAdd Tabnine to your IDE (free)

How to use
getClassLoaders
method
in
org.geotools.factory.FactoryRegistry

Best Java code snippets using org.geotools.factory.FactoryRegistry.getClassLoaders (Showing top 5 results out of 315)

origin: org.geotools/gt-metadata

/**
 * Scans the given category for plugins only if needed. After this method has been
 * invoked once for a given category, it will no longer scan for that category.
 */
private <T> void scanForPluginsIfNeeded(final Class<?> category) {
  if (needScanForPlugins != null && needScanForPlugins.remove(category)) {
    if (needScanForPlugins.isEmpty()) {
      needScanForPlugins = null;
    }
    scanForPlugins(getClassLoaders(), category);
  }
}
origin: org.geotools/gt-metadata

/**
 * Scans for factory plug-ins on the application class path. This method is
 * needed because the application class path can theoretically change, or
 * additional plug-ins may become available. Rather than re-scanning the
 * classpath on every invocation of the API, the class path is scanned
 * automatically only on the first invocation. Clients can call this
 * method to prompt a re-scan. Thus this method need only be invoked by
 * sophisticated applications which dynamically make new plug-ins
 * available at runtime.
 */
public void scanForPlugins() {
  final Set<ClassLoader> loaders = getClassLoaders();
  for (final Iterator<Class<?>> categories=getCategories(); categories.hasNext();) {
    final Class<?> category = categories.next();
    scanForPlugins(loaders, category);
  }
}
origin: org.geotools/gt2-metadata

/**
 * Scans for factory plug-ins on the application class path. This method is
 * needed because the application class path can theoretically change, or
 * additional plug-ins may become available. Rather than re-scanning the
 * classpath on every invocation of the API, the class path is scanned
 * automatically only on the first invocation. Clients can call this
 * method to prompt a re-scan. Thus this method need only be invoked by
 * sophisticated applications which dynamically make new plug-ins
 * available at runtime.
 */
public void scanForPlugins() {
  final Set loaders = getClassLoaders();
  for (final Iterator categories=getCategories(); categories.hasNext();) {
    final Class category = (Class) categories.next();
    scanForPlugins(loaders, category);
  }
}
origin: org.geotools/gt2-metadata

scanForPlugins(getClassLoaders(), category);
iterator = getServiceProviders(category, true);
origin: org.geotools/gt2-metadata

Iterator iterator = getServiceProviders(category, hintsFilter, true);
if (!iterator.hasNext()) {
  scanForPlugins(getClassLoaders(), category);
  iterator = getServiceProviders(category, hintsFilter, true);
org.geotools.factoryFactoryRegistrygetClassLoaders

Javadoc

Returns all class loaders to be used for scanning plugins. Current implementation returns the following class loaders:

  • Class#getClassLoader
  • Thread#getContextClassLoader
  • ClassLoader#getSystemClassLoader
The actual number of class loaders may be smaller if redundancies was found. If some more classloaders should be scanned, they shall be added into the code of this method.

Popular methods of FactoryRegistry

  • getServiceProviders
  • scanForPlugins
    Scans for factory plug-ins of the given category, with guard against recursivities. The recursivity
  • getServiceProvider
    Returns the first provider in the registry for the specified category, using the specified map of hi
  • lookupProviders
  • registerServiceProvider
  • <init>
    Constructs a new registry for the specified categories.
  • debug
    Log a debug message for #getServiceProvider method. Note: we are not required to insert the method n
  • getCachedProviders
    Returns the providers available in the cache, or null if none. To be overridden by FactoryCreator on
  • getCategories
  • getFactories
  • getLogHeader
    Prepares a message to be logged if any provider has been registered.
  • getServiceImplementation
    Search the first implementation in the registery matching the specified conditions. This method is i
  • getLogHeader,
  • getServiceImplementation,
  • getServiceProviderByClass,
  • getUnfilteredProviders,
  • isAcceptable,
  • isAvailable,
  • loadingFailure,
  • log,
  • register

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • putExtra (Intent)
  • getSystemService (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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