|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=METHOD) @Retention(value=RUNTIME) @Documented public @interface Factory
Marks a method as a factory method for a context variable. A factory method is called whenever no value is bound to the named context variable, and is expected to initialize the value of the context variable. There are two kinds of factory methods. Factory methods with void return type are responsible for outjecting a value to the context variable. Factory methods which return a value do not need to explicitly ouject the value, since Seam will bind the returned value to the specified scope. This annotation supports use of the Seam "factory component" pattern.
Optional Element Summary | |
---|---|
boolean |
autoCreate
Specifies that this factory method should be automatically called whenever the variable is asked for, even if @In does not specify create=true. |
ScopeType |
scope
The scope() element is meaningful only for factory methods that return the value to be outjected. |
String |
value
|
public abstract String value
public abstract ScopeType scope
public abstract boolean autoCreate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |