Interface Factory<T>

Type Parameters:
T - The type of the instances being served by the Factory.
All Known Subinterfaces:
TypeFactory<T>
All Known Implementing Classes:
ClassTypeFactory, PrototypeFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Factory<T>
The Factory defines the most basic functionality which must be provided in order to create objects of a predefined type.
  • Method Summary

    Modifier and Type
    Method
    Description
    This method creates / retrieves an instance of the given type.
  • Method Details

    • create

      T create()
      This method creates / retrieves an instance of the given type.
      Returns:
      The instance being fabricated by this factory.