com.iparelan.util.annotations.patterns
Annotation Type Factory


@Documented
@Target(value=TYPE)
@Retention(value=SOURCE)
@Copyright(value="Copyright © 2008, Iparelan Solutions, LLC. All rights reserved.")
public @interface Factory

Marks a class as implementing the Abstract Factory pattern.

Service loader style factories conceptually "implement" the associated FactoryInterface of the factory's package with static methods. The factory delegates object instantiation to a concrete factory implementation. The concrete factory dependency is resolved by loading a service configured in a registry found in the resource directory META-INF/services with a file name that is the binary name of the associated FactoryInterface. The resource file names a plugin that implements the factory.

Version:
July 2008
Author:
Greg Mattes
See Also:
"Inversion of Control Containers and the Dependency Injection Pattern," Martin Fowler, "Design Patterns," Erich Gamma, et. al., "Abstract Factory", "Patterns of Enterprise Application Architecture," Martin Fowler, "Plugin"



Copyright © 2008 Iparelan Solutions, LLC. All rights reserved.