org.geotoolkit.factory
Class Factory.Organizer

Object
  extended by Factory.Organizer
Enclosing class:
Factory

protected final class Factory.Organizer
extends Object

Controls the ordering of the enclosing factory relative to other factories. An instance of this class is passed to the Factory.setOrdering(Organizer) method after the enclosing factory has been registered in FactoryRegistry. That setOrdering method can invoke any method in this class in order to specify whatever the encloding factory should be selected before or after an other factory.

Since:
3.00
Version:
3.03
Author:
Martin Desruisseaux (Geomatys)
Module:
utility/geotk-utility (download)    View source code for this class

Method Summary
 void after(Class<?> type, boolean subclasses)
          Specifies that the enclosing factory should be selected after the specified factory.
 void after(String type, boolean subclasses)
          Specifies that the enclosing factory should be selected after the specified factory.
 void before(Class<?> type, boolean subclasses)
          Specifies that the enclosing factory should be selected before the specified factory.
 void before(String type, boolean subclasses)
          Specifies that the enclosing factory should be selected before the specified factory.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

before

public void before(Class<?> type,
                   boolean subclasses)
Specifies that the enclosing factory should be selected before the specified factory. In other words, the enclosing factory should have precedence over the given one.

If subclasses is false, then this method searches for a factory of exactly the given class. Invoking this method has no effect on the ordering relative to subclasses of the given factory class, unless subclasses is true.

Parameters:
type - The class of the factory which should be selected after the enclosing one.
subclasses - false if the ordering should apply to the given class only, or true if it should apply to subclasses of type as well.

before

public void before(String type,
                   boolean subclasses)
Specifies that the enclosing factory should be selected before the specified factory. This method delegates to before(Class, boolean), or does nothing if no class are found for the given fully-qualified name. This variant is useful when a class may or may not be on the classpath.

Parameters:
type - The fully-qualified name of the factory which should be selected after the enclosing one.
subclasses - false if the ordering should apply to the given class only, or true if it should apply to subclasses of type as well.

after

public void after(Class<?> type,
                  boolean subclasses)
Specifies that the enclosing factory should be selected after the specified factory. In other words, the given factory should have precedence over the enclosing one.

If subclasses is false, then this method searches for a factory of exactly the given class. Invoking this method has no effect on the ordering relative to subclasses of the given factory class, unless subclasses is true.

Parameters:
type - The class of the factory which should be selected before the enclosing one.
subclasses - false if the ordering should apply to the given class only, or true if it should apply to subclasses of type as well.

after

public void after(String type,
                  boolean subclasses)
Specifies that the enclosing factory should be selected after the specified factory. This method delegates to after(Class, boolean), or does nothing if no class are found for the given fully-qualified name. This variant is useful when a class may or may not be on the classpath.

Parameters:
type - The fully-qualified name of the factory which should be selected before the enclosing one.
subclasses - false if the ordering should apply to the given class only, or true if it should apply to subclasses of type as well.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.