Tabnine Logo
FactoryRegistry.getCategories
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.geotools/gt-metadata

/**
 * Constructs a new registry for the specified categories.
 *
 * @param categories The categories.
 */
public FactoryRegistry(final Collection<Class<?>> categories) {
  super(categories.iterator());
  for (final Iterator<Class<?>> it=getCategories(); it.hasNext();) {
    if (needScanForPlugins == null) {
      needScanForPlugins = new HashSet<Class<?>>();
    }
    needScanForPlugins.add(it.next());
  }
}
origin: org.geotools/gt-metadata

/**
 * Sets or unsets a pairwise ordering between all factories meeting a criterion. For example
 * in the CRS framework ({@link org.geotools.referencing.FactoryFinder}), this is used for
 * setting ordering between all factories provided by two vendors, or for two authorities.
 * If one or both factories are not currently registered, or if the desired ordering is
 * already set/unset, nothing happens and false is returned.
 *
 * @param <T>      The class represented by the {@code base} argument.
 * @param base     The base category. Only categories {@linkplain Class#isAssignableFrom
 *                 assignable} to {@code base} will be processed.
 * @param set      {@code true} for setting the ordering, or {@code false} for unsetting.
 * @param service1 Filter for the preferred factory.
 * @param service2 Filter for the factory to which {@code service1} is preferred.
 * @return {@code true} if the ordering changed as a result of this call.
 */
public <T> boolean setOrdering(final Class<T> base, final boolean set,
                final Filter service1, final Filter service2)
{
  boolean done = false;
  for (final Iterator<Class<?>> categories=getCategories(); categories.hasNext();) {
    final Class<?> candidate = categories.next();
    if (base.isAssignableFrom(candidate)) {
      final Class<? extends T> category = candidate.asSubclass(base);
      done |= setOrUnsetOrdering(category, set, service1, service2);
    }
  }
  return done;
}
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/gt-metadata

  return;
for (final Iterator<Class<?>> categories=getCategories(); categories.hasNext();) {
  final Class<?> category = categories.next();
  if (needScanForPlugins == null || !needScanForPlugins.contains(category)) {
origin: org.geotools/gt2-metadata

for (final Iterator categories=getCategories(); categories.hasNext();) {
  final Class category = (Class) categories.next();
  if (base.isAssignableFrom(category)) {
origin: org.geotools/gt2-metadata

  return;
for (final Iterator categories=getCategories(); categories.hasNext();) {
  final Class category = (Class) categories.next();
  if (getServiceProviders(category, false).hasNext()) {
org.geotools.factoryFactoryRegistrygetCategories

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
  • getClassLoaders
    Returns all class loaders to be used for scanning plugins. Current implementation returns the follow
  • 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

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Notification (javax.management)
  • JButton (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • From CI to AI: The AI layer in your organization
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