|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.qualitytest.blueprint.strategy.matching.BuilderMethodMatchingStrategy
public class BuilderMethodMatchingStrategy
Matches all methods, which belong to a class implementing the builder pattern. Matching methods are public methods of any class ending in 'Builder' (configurable) and that take exactly one argument. This matching strategy does never match by type.
| Constructor Summary | |
|---|---|
BuilderMethodMatchingStrategy()
Create a BuilerMethodMatchingStrategy with the default suffix 'Builder' to detect classes implementing
the builder pattern. |
|
BuilderMethodMatchingStrategy(String suffix)
Create a BuilerMethodMatchingStrategy with a configured suffix to detect classes implementing the builder
pattern. |
|
| Method Summary | |
|---|---|
boolean |
matchesByField(Field field)
Test if a field matches this strategy. |
boolean |
matchesByMethod(Method method)
Test if a method matches this strategy. |
boolean |
matchesByType(Class<?> clazz)
Test if a type matches this strategy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BuilderMethodMatchingStrategy()
BuilerMethodMatchingStrategy with the default suffix 'Builder' to detect classes implementing
the builder pattern.
public BuilderMethodMatchingStrategy(@Nonnull
String suffix)
BuilerMethodMatchingStrategy with a configured suffix to detect classes implementing the builder
pattern.
suffix - Suffix of builder classes. Must not be null.| Method Detail |
|---|
public boolean matchesByField(Field field)
MatchingStrategy
matchesByField in interface MatchingStrategyfield - A field
ValueCreationStrategy should be appliedpublic boolean matchesByMethod(Method method)
MatchingStrategy
matchesByMethod in interface MatchingStrategymethod - A method
ValueCreationStrategy should be appliedpublic boolean matchesByType(Class<?> clazz)
MatchingStrategy
matchesByType in interface MatchingStrategyclazz - a clazz type
ValueCreationStrategy should be applied
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||