Class ConstructorCreationMethodStrategy
java.lang.Object
de.floydkretschmar.fixturize.stategies.creation.ConstructorCreationMethodStrategy
- All Implemented Interfaces:
CreationMethodGenerationStrategy
public class ConstructorCreationMethodStrategy
extends Object
implements CreationMethodGenerationStrategy
The strategy that generates on creation method for each
FixtureConstructor annotation on a class also annotated
with Fixture. The parameter names specified in FixtureConstructor.constructorParameters() have to be in
the same order in the constructor that is being referenced. The value itself has to be either the name of the
corresponding field or FixtureConstant.name() if specified on the corresponding field..-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateCreationMethods(TypeElement element, ConstantDefinitionMap constantMap, TypeMetadata metadata) Returns aCollectionof allCreationMethods that have been generated for the provided element and constants according to the specifiedFixtureConstructorstrategy.
-
Constructor Details
-
ConstructorCreationMethodStrategy
public ConstructorCreationMethodStrategy()
-
-
Method Details
-
generateCreationMethods
public Collection<CreationMethod> generateCreationMethods(TypeElement element, ConstantDefinitionMap constantMap, TypeMetadata metadata) Returns aCollectionof allCreationMethods that have been generated for the provided element and constants according to the specifiedFixtureConstructorstrategy.- Specified by:
generateCreationMethodsin interfaceCreationMethodGenerationStrategy- Parameters:
element- - for which the creation methods are being generatedconstantMap- - which contains the already generated constants for reference- Returns:
- a
Collectionof generatedCreationMethods
-