Annotation Type PodamCollection
-
@Documented @PodamAnnotation @Target({FIELD,PARAMETER}) @Retention(RUNTIME) public @interface PodamCollection
Annotation used to customise collection-type elementsPlease note that this annotation can be used with all types of container elements, including arrays.
The minimum number of elements is
PodamConstants.DEFAULT_NBR_COLLECTION_ELEMENTS- Author:
- mtedone
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<? extends AttributeStrategy<?>>collectionElementStrategyThe strategy that will populate the annotated attribute.StringcommentIt allows clients to specify a comment on this annotationClass<? extends AttributeStrategy<?>>mapElementStrategyThe strategy that will populate a map element on an attribute of type Map.Class<? extends AttributeStrategy<?>>mapKeyStrategyThe strategy that will populate a map key on an attribute of type Map.intnbrElementsThe number of elements to create for the collection
-
-
-
-
collectionElementStrategy
Class<? extends AttributeStrategy<?>> collectionElementStrategy
The strategy that will populate the annotated attribute.The default, in order to make the strategy actually optional is type Object. At runtime, only if both the value of this annotation and the collection element type are Objects, then the collection will be set with type
Object, otherwise the collection element type will win.- Returns:
- The strategy that will populate the annotated attribute
- Default:
- uk.co.jemos.podam.api.ObjectStrategy.class
-
-
-
mapKeyStrategy
Class<? extends AttributeStrategy<?>> mapKeyStrategy
The strategy that will populate a map key on an attribute of type Map.The default, in order to make the strategy actually optional is type Object. At runtime, only if both the value of this annotation and the collection element type are Objects, then the collection will be set with type
Object, otherwise the collection element type will win.- Returns:
- The strategy that will populate a map key on an attribute of type Map.
- Default:
- uk.co.jemos.podam.api.ObjectStrategy.class
-
-
-
mapElementStrategy
Class<? extends AttributeStrategy<?>> mapElementStrategy
The strategy that will populate a map element on an attribute of type Map.The default, in order to make the strategy actually optional is type Object. At runtime, only if both the value of this annotation and the collection element type are Objects, then the collection will be set with type
Object, otherwise the collection element type will win.- Returns:
- The strategy that will populate a map element on an attribute of type Map.
- Default:
- uk.co.jemos.podam.api.ObjectStrategy.class
-
-
-
comment
String comment
It allows clients to specify a comment on this annotation- Returns:
- comment value
- Default:
- ""
-
-