Package de.cuioss.test.valueobjects.api.generator


package de.cuioss.test.valueobjects.api.generator
Provides annotations for adding / modifying existing TypedGenerator. This is useful if the dynamically created generators won't fit. This is sometimes the case if an attribute declaration uses an interfaces or abstract-class. Although the generator-system is capable of providing generator capable of creating proxy objects this won't suffice for some needs, because the proxies are not Serializable and not compliant to standard Object.equals(Object) and Object.hashCode() contracts. There are two ways to configure the generator
  • PropertyGeneratorHint: Actually hints the generator system which concrete implementation type to use for a declaredType: @PropertyGeneratorHint(declaredType = Serializable.class, implementationType = Integer.class) defines that each Serializable should be an Integer Caution: The implementationType should always provide an accessible Constructor. Factory or builder methods for object-creation will not be picked up at this level of configuration.
  • PropertyGenerator: Defines explicitly an implementation of TypedGenerator to be used.