Child pages
  • NewIn2AutowiringService
Skip to end of metadata
Go to start of metadata

Extensible Autowiring Service

Autowiring was separated from the xml processing and is now a regular service in the framework:

public interface Autowiring
{
    public Object autowireProperties(Object target, String[] propertyNames);
    public Object autowireProperties(Object target);
    public Object autowireProperties(String strategy, Object target, String[] propertyNames);
    public Object autowireProperties(String strategy, Object target);
}

The autowiring service delegates the wiring to implementations of AutowiringStrategies. If no strategy is specified the all available strategies are tried until one strategy succeeds. The list of strategies and its order is configurable via the "hivemind.AutowiringStrategies" configuration point.

This is the AutowiringStrategy interface:

public interface AutowiringStrategy
{
    public boolean autowireProperty(RegistryInfrastructure registry, Object target, String propertyName);
}

Currently AutowiringByTypeStrategy is available only.

  • No labels