Interface Factory<T>

Type Parameters:
T - The type of the instance returned by the Factory implementation.

public interface Factory<T>
Generics-aware interface supporting the Factory Method design pattern.
Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an instance of the required type.
  • Method Details

    • getInstance

      T getInstance()
      Returns an instance of the required type. The implementation determines whether or not a new or cached instance is created every time this method is called.
      Returns:
      an instance of the required type.