Package com.blackbuild.klum.ast.layer3
Annotation Interface AutoCreate
@Target({FIELD,METHOD})
@Retention(RUNTIME)
@WriteAccess(LIFECYCLE)
@Documented
public @interface AutoCreate
Auto create the object of this field, if still
null during the auto create phase.
The value must be a literal Map containing the values to be passed to the create method.
For keyed fields, the key must be passed as key() parameter. Additionally, the
concrete type of the object to be created can be passed as type() parameter. If
the annotated field is an abstract type, the type parameter is mandatory.
When placed on a field of type closure, the behavior is slightly different. In that case, the closure is called during the lifecycle phase.
AutoCreate can also be used on methods. In that case, the method is handled as a regular lifecycle method.
If AutoCreate is placed on a Cluster field, all matching fields of the cluster auto created,
as if the annotation was placed on each of them.
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional Elements -
Field Summary
Fields
-
Field Details
-
DEFAULT_KEY
- See Also:
-
-
Element Details