Class EngineCollection

All Implemented Interfaces:
PluginFeature

public class EngineCollection extends ConstructorFeature<Engine,IdentifiedCollection<Identified>>

An engine collection allows new IdentifiedCollections to be plugged in, accessible via IdentifiedLocator.getCollection(Class)

  • Constructor Details

  • Method Details

    • of

      public static <T extends IdentifiedCollection<?>> EngineCollection of(Class<T> collClass)

      Generics-defeating constructor for a new EngineCollection. Without this, the compiler complains that a specific IdentifiedCollection is not OK, even though in practice it's fine and won't produce class cast exceptions. The fix for this is to make EngineCollection accept a type variable, but that confuses the ConstructorFeature interface (newInstance always seems to return Object), so we kludge it like this instead