Class AbstractFactory<A,​B,​C,​D>

  • All Implemented Interfaces:
    Factory<C>
    Direct Known Subclasses:
    ConcreteFactory

    public abstract class AbstractFactory<A,​B,​C,​D>
    extends Object
    implements Factory<C>
    This is an abstract factory, the true type will comd from the concrete class
    Author:
    jwells
    • Constructor Detail

      • AbstractFactory

        public AbstractFactory()
    • Method Detail

      • getA

        public abstract A getA()
      • getB

        public abstract B getB()
      • getC

        public abstract C getC()
      • getD

        public abstract D getD()
      • provide

        @Singleton
        public C provide()
        Description copied from interface: Factory
        This method will create instances of the type of this factory. The provide method must be annotated with the desired scope and qualifiers.
        Specified by:
        provide in interface Factory<A>
        Returns:
        The produces object
      • dispose

        public void dispose​(C killMe)
        Description copied from interface: Factory
        This method will dispose of objects created with this scope. This method should not be annotated, as it is naturally paired with the provide method
        Specified by:
        dispose in interface Factory<A>
        Parameters:
        killMe - The instance to dispose of