org.jvnet.hk2.annotations
Annotation Type Factory
@Retention(value=RUNTIME)
@Target(value=TYPE)
@Documented
public @interface Factory
Indicates that the object should be created by using the given factory component,
instead of calling the constructor.
If specified, the factory component is activated, and
Provider.get() is used to obtain the instance,
instead of the default action, which is to call the constructor.
The resource injection and extraction happens like it normally
does, after the factory returns the object.
- Author:
- Kohsuke Kawaguchi
- See Also:
FactoryFor
|
Required Element Summary |
java.lang.Class<? extends Provider> |
value
|
value
public abstract java.lang.Class<? extends Provider> value
Copyright © 2011 Oracle Corporation. All Rights Reserved.