Class NamedComponentFactory

All Implemented Interfaces:
ComponentFactory

@Deprecated(forRemoval=true) public abstract class NamedComponentFactory extends AbstractComponentFactory
Deprecated, for removal: This API element is subject to removal in a future version.
Since 9.4, please implement AnyScopeComponentFactory.construct(String) directly.
A specialized type of component factory that knows how to create named components, identified with the ComponentName annotation on the classes requested in Inject annotated methods.
Since:
4.0
Author:
Manik Surtani
  • Constructor Details

    • NamedComponentFactory

      public NamedComponentFactory()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • construct

      public Object construct(String componentName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      construct in interface ComponentFactory
      Overrides:
      construct in class AnyScopeComponentFactory
      Returns:
      Either a component instance or a ComponentAlias pointing to another component.
    • construct

      public abstract <T> T construct(Class<T> componentType, String componentName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a component.
      Parameters:
      componentType - type of component
      Returns:
      a component