Class PropertyMetadataImpl
java.lang.Object
de.cuioss.test.valueobjects.property.impl.PropertyMetadataImpl
- All Implemented Interfaces:
PropertyMetadata
,Comparable<PropertyMetadata>
Gathers all information needed for dynamically creating / asserting
properties.
- Author:
- Oliver Wolff
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder
(PropertyMetadata copyFrom) int
compareTo
(PropertyMetadata other) next()
Generates a next random value Similar toTypedGenerator.next()
but in case there is aPropertyMetadata.getCollectionType()
that is notCollectionType.NO_ITERABLE
it wraps the content of the contained generator into a the corresponding collectionWrapper, seeCollectionType.nextIterable(CollectionGenerator)
Class<?>
de.cuioss.test.generator.impl.CollectionGenerator<?>
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.cuioss.test.valueobjects.property.PropertyMetadata
getAssertionStrategy, getCollectionType, getGenerator, getName, getPropertyAccessStrategy, getPropertyClass, getPropertyMemberInfo, getPropertyReadWrite, isDefaultValue, isRequired
-
Constructor Details
-
PropertyMetadataImpl
public PropertyMetadataImpl()
-
-
Method Details
-
next
Description copied from interface:PropertyMetadata
Generates a next random value Similar toTypedGenerator.next()
but in case there is aPropertyMetadata.getCollectionType()
that is notCollectionType.NO_ITERABLE
it wraps the content of the contained generator into a the corresponding collectionWrapper, seeCollectionType.nextIterable(CollectionGenerator)
- Specified by:
next
in interfacePropertyMetadata
- Returns:
- the next generated value
-
resolveCollectionGenerator
- Specified by:
resolveCollectionGenerator
in interfacePropertyMetadata
- Returns:
- a new instance of
CollectionGenerator
wrapping the contained generator;
-
resolveActualClass
- Specified by:
resolveActualClass
in interfacePropertyMetadata
- Returns:
- The actual class of the property. PropertyMetadata can always be used directly or the data can be implicitly wrapped into a collection or an array. This method computes the actual class of the property combining both informations
-
builder
- Returns:
- a new instance of
PropertyMetadataImpl.PropertyMetadataBuilder
-
builder
- Parameters:
copyFrom
- to be use as template, must not be null- Returns:
- a new instance of
PropertyMetadataImpl.PropertyMetadataBuilder
with the content of copyFrom being already copied into
-
compareTo
- Specified by:
compareTo
in interfaceComparable<PropertyMetadata>
-
toString
-