org.opengis.test
Interface FactoryFilter

Show UML class diagram
All Known Implementing Classes:
FactoryFilter.ByAuthority

public interface FactoryFilter

Specifies whether a factory can be used for creating the objects to be tested. Implementors can provide an instance of this interface in their test packages and declare their instance in the META-INF/services/org.opengis.test.FactoryFilter file. GeoAPI will iterate over every FactoryFilters found on the classpath before the first execution of any particular TestCase subclass, in order to check whether a particular factory can be used.

Since:
3.1

Nested Class Summary
static class FactoryFilter.ByAuthority
          Filters AuthorityFactory by their authority name.
 
Method Summary
<T extends Factory>
boolean
filter(Class<T> category, T factory)
          Returns true if the given factory can be tested.
 

Method Detail

filter

<T extends Factory> boolean filter(Class<T> category,
                                   T factory)
Returns true if the given factory can be tested. Implementors shall return false only when they really want to exclude a particular factory. For every unknown factory, this method shall return true.

If more than one FactoryFilter is found on the classpath, then the given factory will be tested only if all FactoryFilter.filter(...) calls returned true.

Type Parameters:
T - The compile-time type of the category argument.
Parameters:
category - The factory interface (NameFactory, CRSFactory, etc.).
factory - The factory instance.
Returns:
false if the given factory should be excluded from the tests, or true otherwise.


Copyright © 1994-2013 Open Geospatial Consortium. All Rights Reserved.