From 22f2d6ec87597428835c6bc95eb6aa8cc6d0ddeb Mon Sep 17 00:00:00 2001 From: Daniil Ivanov Date: Sat, 29 Jul 2023 18:43:21 +0300 Subject: [PATCH] Site updated --- annotations.html | 904 +++--- corner-cases.html | 910 +++--- css/maven-base.css | 0 css/maven-theme.css | 0 css/podam.css | 0 css/print.css | 0 css/site.css | 0 downloads.html | 16 +- failsafe-report.html | 3576 ++++++++++++----------- faqs.html | 146 +- how-to-contribute.html | 36 +- images/close.gif | Bin 279 -> 0 bytes images/collapsed.gif | Bin images/expanded.gif | Bin images/external.png | Bin images/icon_error_sml.gif | Bin images/icon_info_sml.gif | Bin images/icon_success_sml.gif | Bin images/icon_warning_sml.gif | Bin images/idea.jpg | Bin images/logo.gif | Bin images/logos/build-by-maven-black.png | Bin images/logos/build-by-maven-white.png | Bin images/logos/maven-feather.png | Bin images/newwindow.png | Bin images/nexus-oss.png | Bin images/walkthrough-example.png | Bin index.html | 770 ++--- integration.html | 32 +- issue-tracking.html | 26 +- license.html | 68 +- mail-lists.html | 42 +- project-info.html | 70 +- project-reports.html | 70 +- project-summary.html | 94 +- release-notes/release-notes.html | 0 source-repository.html | 82 +- sponsors/sponsors.html | 0 surefire-report.html | 97 +- team-list.html | 382 +-- uml/Type Hierarchy.png | Bin uml/architecture.html | 0 uml/podam-architecture.png | Bin uml/podam.mdj | 0 uml/type-manufacturers-architecture.png | Bin usage.html | 230 +- validation-api.html | 284 +- walk-through-example.html | 1852 ++++++------ 48 files changed, 4969 insertions(+), 4718 deletions(-) mode change 100644 => 100755 annotations.html mode change 100644 => 100755 corner-cases.html mode change 100644 => 100755 css/maven-base.css mode change 100644 => 100755 css/maven-theme.css mode change 100644 => 100755 css/podam.css mode change 100644 => 100755 css/print.css mode change 100644 => 100755 css/site.css mode change 100644 => 100755 downloads.html mode change 100644 => 100755 failsafe-report.html mode change 100644 => 100755 faqs.html mode change 100644 => 100755 how-to-contribute.html delete mode 100644 images/close.gif mode change 100644 => 100755 images/collapsed.gif mode change 100644 => 100755 images/expanded.gif mode change 100644 => 100755 images/external.png mode change 100644 => 100755 images/icon_error_sml.gif mode change 100644 => 100755 images/icon_info_sml.gif mode change 100644 => 100755 images/icon_success_sml.gif mode change 100644 => 100755 images/icon_warning_sml.gif mode change 100644 => 100755 images/idea.jpg mode change 100644 => 100755 images/logo.gif mode change 100644 => 100755 images/logos/build-by-maven-black.png mode change 100644 => 100755 images/logos/build-by-maven-white.png mode change 100644 => 100755 images/logos/maven-feather.png mode change 100644 => 100755 images/newwindow.png mode change 100644 => 100755 images/nexus-oss.png mode change 100644 => 100755 images/walkthrough-example.png mode change 100644 => 100755 index.html mode change 100644 => 100755 integration.html mode change 100644 => 100755 issue-tracking.html mode change 100644 => 100755 license.html mode change 100644 => 100755 mail-lists.html mode change 100644 => 100755 project-info.html mode change 100644 => 100755 project-reports.html mode change 100644 => 100755 project-summary.html mode change 100644 => 100755 release-notes/release-notes.html mode change 100644 => 100755 source-repository.html mode change 100644 => 100755 sponsors/sponsors.html mode change 100644 => 100755 surefire-report.html mode change 100644 => 100755 team-list.html mode change 100644 => 100755 uml/Type Hierarchy.png mode change 100644 => 100755 uml/architecture.html mode change 100644 => 100755 uml/podam-architecture.png mode change 100644 => 100755 uml/podam.mdj mode change 100644 => 100755 uml/type-manufacturers-architecture.png mode change 100644 => 100755 usage.html mode change 100644 => 100755 validation-api.html mode change 100644 => 100755 walk-through-example.html diff --git a/annotations.html b/annotations.html old mode 100644 new mode 100755 index a79215a88..22da2267b --- a/annotations.html +++ b/annotations.html @@ -1,5 +1,5 @@ - + @@ -10,7 +10,7 @@ @import url("./css/site.css"); - + @@ -27,7 +27,7 @@
- Version: 7.1.1.RELEASE + Version: 8.0.0.RELEASE
Podam @ GitHub | @@ -97,7 +97,7 @@
Project Documentation
- @@ -110,444 +110,460 @@
Project Documentation
-
-

Podam Custom Annotations

-

For the full syntax of PODAM annotations, please refer to the Javadocs

-
-

@PodamStrategyValue

-

This is probably the most valuable annotation of all. It allows users to define the strategy PODAM should use at the attribute level. To create a custom strategy, create an implementation of the AttributeStrategy<T> interface and use it in the value attribute of this annotation.

-

Example:

-
-
-@PodamStrategyValue(PostCodeStrategy.class)
-private String postCode;
-
-@PodamStrategyValue(MyBirthdayStrategy.class)
-private Calendar myBirthday;
-
-
-

@PodamBooleanValue

-

It allows the customisation of boolean / Boolean attributes.

- - - - - - -
AttributeDescription
boolValueIt dictates the value that will be assigned to the annotated attribute. Can only be true or false
-

Example:

-
-
-/** A boolean field with value forced to true */
-@PodamBooleanValue(boolValue = true)
-private boolean boolDefaultToTrue;
-
-/** A boolean field with value forced to false */
-@PodamBooleanValue(boolValue = false)
-private boolean boolDefaultToFalse = true;
-
-

Top

-
-

@PodamByteValue

-

It allows the customisation of byte / Byte attributes.

- - - - - - - - - - - - -
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
-

Example:

-
-
-@PodamByteValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE)
-private byte byteFieldWithMinValueOnly;
-
-@PodamByteValue(maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
-private byte byteFieldWithMaxValueOnly;
-
-@PodamByteValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
-private byte byteFieldWithMinAndMaxValue;  
-
-@PodamByteValue(numValue = PodamTestConstants.BYTE_PRECISE_VALUE)
-private byte byteFieldWithPreciseValue;
-
-

Top

-
-

@PodamShortValue

-

It allows the customisation of short / Short attributes.

- - - - - - - - - - - - -
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
-

Example:

-
-
-@PodamShortValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE)
-private short shortFieldWithMinValueOnly;
-
-@PodamShortValue(maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
-private short shortFieldWithMaxValueOnly;
-
-@PodamShortValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
-private short shortFieldWithMinAndMaxValue;
-
-@PodamShortValue(numValue = PodamTestConstants.SHORT_PRECISE_VALUE)
-private short shortFieldWithPreciseValue;
-
-

Top

-
-

@PodamCharValue

-

It allows the customisation of char / Character attributes.

- - - - - - - - - - - - -
AttributeDescription
charValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
-

Example:

-
-
-@PodamCharValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE)
-private char charFieldWithMinValueOnly;
-
-@PodamCharValue(maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
-private char charFieldWithMaxValueOnly;
-
-@PodamCharValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
-private char charFieldWithMinAndMaxValue;
-
-@PodamCharValue(charValue = PodamTestConstants.CHAR_PRECISE_VALUE)
-private char charFieldWithPreciseValue;
-
-

Top

-
-

@PodamIntValue

-

It allows the customisation of int / Integer attributes.

- - - - - - - - - - - - -
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
-

Example:

-
-
-@PodamIntValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE)
-private int intFieldWithMinValueOnly;
-
-@PodamIntValue(numValue = PodamTestConstants.INTEGER_PRECISE_VALUE)
-private int intFieldWithPreciseValue;
-
-@PodamIntValue(maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
-private int intFieldWithMaxValueOnly;
-
-@PodamIntValue(numValue = PodamTestConstants.INTEGER_PRECISE_VALUE)
-private Integer integerObjectFieldWithPreciseValue;
-
-

Top

-
-

@PodamLongValue

-

It allows the customisation of long / Long attributes.

- - - - - - - - - - - - -
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
-

Example:

-
-
-@PodamLongValue(minValue = 0)
-private long longFieldWithMinValueOnly;
-
-@PodamLongValue(maxValue = 100)
-private long longFieldWithMaxValueOnly;
-
-@PodamLongValue(minValue = 0, maxValue = 1000)
-private long longFieldWithMinAndMaxValue;
-
-@PodamLongValue(numValue = PodamTestConstants.LONG_PRECISE_VALUE)
-private Long longObjectFieldWithPreciseValue;
-
-

Top

-
-

@PodamFloatValue

-

It allows the customisation of float / Float attributes.

- - - - - - - - - - - - -
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
-

Example:

-
-
-@PodamFloatValue(minValue = PodamTestConstants.NUMBER_FLOAT_MIN_VALUE)
-private float floatFieldWithMinValueOnly;
-
-@PodamFloatValue(maxValue = PodamTestConstants.NUMBER_FLOAT_ONE_HUNDRED)
-private float floatFieldWithMaxValueOnly;
-
-@PodamFloatValue(minValue = PodamTestConstants.NUMBER_FLOAT_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_FLOAT_MAX_VALUE)
-private float floatFieldWithMinAndMaxValue;
-
-@PodamFloatValue(numValue = PodamTestConstants.FLOAT_PRECISE_VALUE)
-private Float floatObjectFieldWithPreciseValue;
-
-

Top

-
-

@PodamDoubleValue

-

It allows the customisation of double / Double attributes.

- - - - - - - - - - - - -
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
-

Example:

-
-
-@PodamDoubleValue(minValue = PodamTestConstants.NUMBER_DOUBLE_MIN_VALUE)
-private double doubleFieldWithMinValueOnly;
-
-@PodamDoubleValue(maxValue = PodamTestConstants.NUMBER_DOUBLE_ONE_HUNDRED)
-private double doubleFieldWithMaxValueOnly;
-
-@PodamDoubleValue(minValue = PodamTestConstants.NUMBER_DOUBLE_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_DOUBLE_MAX_VALUE)
-private double doubleFieldWithMinAndMaxValue;
-
-@PodamDoubleValue(numValue = PodamTestConstants.DOUBLE_PRECISE_VALUE)
-private Double doubleObjectFieldWithPreciseValue;
-
-

Top

-
-

@PodamStringValue

-

It allows the customisation of String attributes

- - - - - - - - - -
AttributeDescription
strValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
lengthIt defines how long the string shall be. This attribute will be taken into consideration only if strValue has not been defined.
-

Example:

-
-
-@PodamStringValue(length = PodamTestConstants.STR_ANNOTATION_TWENTY_LENGTH)
-/** A String attribute with length 20 */
-private String twentyLengthString;
-
-@PodamStringValue(strValue = PodamTestConstants.STR_ANNOTATION_PRECISE_VALUE)
-private String preciseValueString;
-
-

Top

-
-

@PodamCollection

-

It allows the customisation of container-like data structures, such as Collections, Maps and Arrays. The default strategy for all container-like data structure is uk.co.jemos.podam.annotations.strategies.ObjectStrategy whose behaviour is to return a new Object instance. This strategy will be used only if the container element type is Object itself. Otherwise the element type wins.

- - - - - - - - - - - - - - - -
AttributeDescription
nbrElementsIt defines how many elements should be created for the container-like data structure
collectionElementStrategyIt defines which AttributeStrategy<T> should be used to fill each element in the collection. Used for Collections and Arrays. Not used for Maps.
mapKeyStrategyIt defines which AttributeStrategy<T> should be used to fill keys of a Map. Used only for Maps
mapElementStrategyIt defines which AttributeStrategy<T> should be used to fill elements of a Map. Used only for Maps
-

Example for a Collection. It will fill a ListCalendar with two elements. Each element will be filled according to the MyBirthdayStrategy strategy.

-
-
-@PodamCollection(nbrElements = 2, collectionElementStrategy = MyBirthdayStrategy.class)
-private List<Calendar> myBirthdays = new ArrayList<Calendar>();
-
-

Example for a Map. It will fill a MapString, Calendar with two elements. Each Map element will be filled according to the MyBirthdayStrategy strategy.

-
-
-@PodamCollection(nbrElements = 2, mapElementStrategy = MyBirthdayStrategy.class)
-private Map<String, Calendar> myBirthdaysMap = new HashMap<String, Calendar>();
-
-

Example for an Array. It will fill an array of Calendars. Each array element will be filled according to the MyBirthdayStrategy strategy.

-
-
-@PodamCollection(nbrElements = 2, collectionElementStrategy = MyBirthdayStrategy.class)
-private Calendar[] myBirthdaysArray;
-
-

Top

-
-

@PodamConstructor

-

Allows a constructor to be identified in a setter-less POJO. This is a PODAM requirement: for those POJOs without setters (e.g. immutable classes) a constructor annotated with this annotations is required. @PodamConstructor can be used as a marker interface.

- - - - - - -
AttributeDescription
commentIt allows users to write a comment on the use of this annotation
-

Example:

-
-
/**
- * 
- */
-package uk.co.jemos.podam.test.dto;
-
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.Calendar;
-
-import net.jcip.annotations.Immutable;
-import uk.co.jemos.podam.annotations.PodamConstructor;
-
-/**
- * This is an immutable POJO to test PODAM's ability to create an instance which
- * hasn't got setters
- * 
- * @author mtedone
- * 
- */
-@Immutable
-public class ImmutableNoHierarchicalAnnotatedPojo implements Serializable {     
-
-        private static final long serialVersionUID = 1L;
-        
-
-        /** An int field */
-        private final int intField;
-
-        /** A Calendar field */
-        private final Calendar dateCreated;
-
-        /** An array of longs */
-        private final long[] longArray; 
-
-        /**
-         * Full constructor
-         * 
-         * @param intField
-         * @param dateCreated
-         * @param longArray
-         */
-        @PodamConstructor
-        public ImmutableNoHierarchicalAnnotatedPojo(int intField, Calendar dateCreated,
-                        long[] longArray) {
-                super();
-                this.intField = intField;
-                this.dateCreated = dateCreated;
-                this.longArray = longArray;
-        }
-
-        
-        /**
-         * @return the intField
-         */
-        public int getIntField() {
-                return intField;
-        }
-
-        /**
-         * @return the dateCreated
-         */
-        public Calendar getDateCreated() {
-                return dateCreated;
-        }
-
-        /**
-         * @return the longArray
-         */
-        public long[] getLongArray() {
-                return longArray;
-        }
-
-
-}
-
-

Top

-
-

@PodamExclude

-

This annotation is used to instruct PODAM to skip the initialisation of a certain attribute.

- - - - - - -
AttributeDescription
commentIt allows users to write a comment on the use of this annotation
-

Example:

-
-
-        public class Pojo {
-
-                /** PODAM will not fill this attribute */
-                @PodamExclude
-                private SimplePojoToTestSetters somePojo;
-        }
-
-

An alternative to this annotation is reloading ClassInfoStrategy.getExcludedFields()

-

Example:

-
-
-        private final static DefaultClassInfoStrategy classInfoStrategy =
-                        DefaultClassInfoStrategy.getInstance();
-        classInfoStrategy.addExcludedField(Pojo.class, "somePojo");
+        
+

Podam Custom Annotations

+

For the full syntax of PODAM annotations, please refer to the Javadocs

+
+

@PodamStrategyValue

+

This is probably the most valuable annotation of all. It allows users to define the strategy PODAM should use at the attribute level. To create a custom strategy, create an implementation of the AttributeStrategy<T> interface and use it in the value attribute of this annotation.

+

Example:

+
+
+@PodamStrategyValue(PostCodeStrategy.class)
+private String postCode;
+
+@PodamStrategyValue(MyBirthdayStrategy.class)
+private Calendar myBirthday;
+
+
+
+

@PodamBooleanValue

+

It allows the customisation of boolean / Boolean attributes.

+ + + + + + +
AttributeDescription
boolValueIt dictates the value that will be assigned to the annotated attribute. Can only be true or false
+

Example:

+
+
+/** A boolean field with value forced to true */
+@PodamBooleanValue(boolValue = true)
+private boolean boolDefaultToTrue;
+
+/** A boolean field with value forced to false */
+@PodamBooleanValue(boolValue = false)
+private boolean boolDefaultToFalse = true;
+
+
+

Top

+
+

@PodamByteValue

+

It allows the customisation of byte / Byte attributes.

+ + + + + + + + + + + + +
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
+

Example:

+
+
+@PodamByteValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE)
+private byte byteFieldWithMinValueOnly;
+
+@PodamByteValue(maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
+private byte byteFieldWithMaxValueOnly;
+
+@PodamByteValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
+private byte byteFieldWithMinAndMaxValue;  
+
+@PodamByteValue(numValue = PodamTestConstants.BYTE_PRECISE_VALUE)
+private byte byteFieldWithPreciseValue;
+
+
+

Top

+
+

@PodamShortValue

+

It allows the customisation of short / Short attributes.

+ + + + + + + + + + + + +
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
+

Example:

+
+
+@PodamShortValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE)
+private short shortFieldWithMinValueOnly;
+
+@PodamShortValue(maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
+private short shortFieldWithMaxValueOnly;
+
+@PodamShortValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
+private short shortFieldWithMinAndMaxValue;
+
+@PodamShortValue(numValue = PodamTestConstants.SHORT_PRECISE_VALUE)
+private short shortFieldWithPreciseValue;
+
+
+

Top

+
+

@PodamCharValue

+

It allows the customisation of char / Character attributes.

+ + + + + + + + + + + + +
AttributeDescription
charValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
+

Example:

+
+
+@PodamCharValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE)
+private char charFieldWithMinValueOnly;
+
+@PodamCharValue(maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
+private char charFieldWithMaxValueOnly;
+
+@PodamCharValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
+private char charFieldWithMinAndMaxValue;
+
+@PodamCharValue(charValue = PodamTestConstants.CHAR_PRECISE_VALUE)
+private char charFieldWithPreciseValue;
+
+
+

Top

+
+

@PodamIntValue

+

It allows the customisation of int / Integer attributes.

+ + + + + + + + + + + + +
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
+

Example:

+
+
+@PodamIntValue(minValue = PodamTestConstants.NUMBER_INT_MIN_VALUE)
+private int intFieldWithMinValueOnly;
+
+@PodamIntValue(numValue = PodamTestConstants.INTEGER_PRECISE_VALUE)
+private int intFieldWithPreciseValue;
+
+@PodamIntValue(maxValue = PodamTestConstants.NUMBER_INT_ONE_HUNDRED)
+private int intFieldWithMaxValueOnly;
+
+@PodamIntValue(numValue = PodamTestConstants.INTEGER_PRECISE_VALUE)
+private Integer integerObjectFieldWithPreciseValue;
+
+
+

Top

+
+

@PodamLongValue

+

It allows the customisation of long / Long attributes.

+ + + + + + + + + + + + +
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
+

Example:

+
+
+@PodamLongValue(minValue = 0)
+private long longFieldWithMinValueOnly;
+
+@PodamLongValue(maxValue = 100)
+private long longFieldWithMaxValueOnly;
+
+@PodamLongValue(minValue = 0, maxValue = 1000)
+private long longFieldWithMinAndMaxValue;
+
+@PodamLongValue(numValue = PodamTestConstants.LONG_PRECISE_VALUE)
+private Long longObjectFieldWithPreciseValue;
+
+
+

Top

+
+

@PodamFloatValue

+

It allows the customisation of float / Float attributes.

+ + + + + + + + + + + + +
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
+

Example:

+
+
+@PodamFloatValue(minValue = PodamTestConstants.NUMBER_FLOAT_MIN_VALUE)
+private float floatFieldWithMinValueOnly;
+
+@PodamFloatValue(maxValue = PodamTestConstants.NUMBER_FLOAT_ONE_HUNDRED)
+private float floatFieldWithMaxValueOnly;
+
+@PodamFloatValue(minValue = PodamTestConstants.NUMBER_FLOAT_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_FLOAT_MAX_VALUE)
+private float floatFieldWithMinAndMaxValue;
+
+@PodamFloatValue(numValue = PodamTestConstants.FLOAT_PRECISE_VALUE)
+private Float floatObjectFieldWithPreciseValue;
+
+
+

Top

+
+

@PodamDoubleValue

+

It allows the customisation of double / Double attributes.

+ + + + + + + + + + + + +
AttributeDescription
numValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
minValueIt identifies the minimum value (inclusive) that the annotated attribute will be assigned.
maxValueIt identifies the maximum value (inclusive) that the annotated attribute will be assigned.
+

Example:

+
+
+@PodamDoubleValue(minValue = PodamTestConstants.NUMBER_DOUBLE_MIN_VALUE)
+private double doubleFieldWithMinValueOnly;
+
+@PodamDoubleValue(maxValue = PodamTestConstants.NUMBER_DOUBLE_ONE_HUNDRED)
+private double doubleFieldWithMaxValueOnly;
+
+@PodamDoubleValue(minValue = PodamTestConstants.NUMBER_DOUBLE_MIN_VALUE, maxValue = PodamTestConstants.NUMBER_DOUBLE_MAX_VALUE)
+private double doubleFieldWithMinAndMaxValue;
+
+@PodamDoubleValue(numValue = PodamTestConstants.DOUBLE_PRECISE_VALUE)
+private Double doubleObjectFieldWithPreciseValue;
+
+
+

Top

+
+

@PodamStringValue

+

It allows the customisation of String attributes

+ + + + + + + + + +
AttributeDescription
strValueTakes precedence over all other attributes. It dictates the value that will be assigned to the annotated attribute
lengthIt defines how long the string shall be. This attribute will be taken into consideration only if strValue has not been defined.
+

Example:

+
+
+@PodamStringValue(length = PodamTestConstants.STR_ANNOTATION_TWENTY_LENGTH)
+/** A String attribute with length 20 */
+private String twentyLengthString;
+
+@PodamStringValue(strValue = PodamTestConstants.STR_ANNOTATION_PRECISE_VALUE)
+private String preciseValueString;
+
+
+

Top

+
+

@PodamCollection

+

It allows the customisation of container-like data structures, such as Collections, Maps and Arrays. The default strategy for all container-like data structure is uk.co.jemos.podam.annotations.strategies.ObjectStrategy whose behaviour is to return a new Object instance. This strategy will be used only if the container element type is Object itself. Otherwise the element type wins.

+ + + + + + + + + + + + + + + +
AttributeDescription
nbrElementsIt defines how many elements should be created for the container-like data structure
collectionElementStrategyIt defines which AttributeStrategy<T> should be used to fill each element in the collection. Used for Collections and Arrays. Not used for Maps.
mapKeyStrategyIt defines which AttributeStrategy<T> should be used to fill keys of a Map. Used only for Maps
mapElementStrategyIt defines which AttributeStrategy<T> should be used to fill elements of a Map. Used only for Maps
+

Example for a Collection. It will fill a ListCalendar with two elements. Each element will be filled according to the MyBirthdayStrategy strategy.

+
+
+@PodamCollection(nbrElements = 2, collectionElementStrategy = MyBirthdayStrategy.class)
+private List<Calendar> myBirthdays = new ArrayList<Calendar>();
+
+
+

Example for a Map. It will fill a MapString, Calendar with two elements. Each Map element will be filled according to the MyBirthdayStrategy strategy.

+
+
+@PodamCollection(nbrElements = 2, mapElementStrategy = MyBirthdayStrategy.class)
+private Map<String, Calendar> myBirthdaysMap = new HashMap<String, Calendar>();
+
+
+

Example for an Array. It will fill an array of Calendars. Each array element will be filled according to the MyBirthdayStrategy strategy.

+
+
+@PodamCollection(nbrElements = 2, collectionElementStrategy = MyBirthdayStrategy.class)
+private Calendar[] myBirthdaysArray;
+
+
+

Top

+
+

@PodamConstructor

+

Allows a constructor to be identified in a setter-less POJO. This is a PODAM requirement: for those POJOs without setters (e.g. immutable classes) a constructor annotated with this annotations is required. @PodamConstructor can be used as a marker interface.

+ + + + + + +
AttributeDescription
commentIt allows users to write a comment on the use of this annotation
+

Example:

+
+
/**
+ * 
+ */
+package uk.co.jemos.podam.test.dto;
+
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.Calendar;
+
+import net.jcip.annotations.Immutable;
+import uk.co.jemos.podam.annotations.PodamConstructor;
+
+/**
+ * This is an immutable POJO to test PODAM's ability to create an instance which
+ * hasn't got setters
+ * 
+ * @author mtedone
+ * 
+ */
+@Immutable
+public class ImmutableNoHierarchicalAnnotatedPojo implements Serializable {     
+
+        private static final long serialVersionUID = 1L;
+        
+
+        /** An int field */
+        private final int intField;
+
+        /** A Calendar field */
+        private final Calendar dateCreated;
+
+        /** An array of longs */
+        private final long[] longArray; 
+
+        /**
+         * Full constructor
+         * 
+         * @param intField
+         * @param dateCreated
+         * @param longArray
+         */
+        @PodamConstructor
+        public ImmutableNoHierarchicalAnnotatedPojo(int intField, Calendar dateCreated,
+                        long[] longArray) {
+                super();
+                this.intField = intField;
+                this.dateCreated = dateCreated;
+                this.longArray = longArray;
+        }
+
+        
+        /**
+         * @return the intField
+         */
+        public int getIntField() {
+                return intField;
+        }
+
+        /**
+         * @return the dateCreated
+         */
+        public Calendar getDateCreated() {
+                return dateCreated;
+        }
+
+        /**
+         * @return the longArray
+         */
+        public long[] getLongArray() {
+                return longArray;
+        }
+
+
+}
+
+
+

Top

+
+

@PodamExclude

+

This annotation is used to instruct PODAM to skip the initialisation of a certain attribute.

+ + + + + + +
AttributeDescription
commentIt allows users to write a comment on the use of this annotation
+

Example:

+
+
+        public class Pojo {
+
+                /** PODAM will not fill this attribute */
+                @PodamExclude
+                private SimplePojoToTestSetters somePojo;
+        }
+
+
+

An alternative to this annotation is reloading ClassInfoStrategy.getExcludedFields()

+

Example:

+
+
+        private final static DefaultClassInfoStrategy classInfoStrategy =
+                        DefaultClassInfoStrategy.getInstance();
+        classInfoStrategy.addExcludedField(Pojo.class, "somePojo");
+
 
@@ -556,10 +572,10 @@

@PodamExclude