|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.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 MatchingStrategy
field
- A field
ValueCreationStrategy
should be appliedpublic boolean matchesByMethod(Method method)
MatchingStrategy
matchesByMethod
in interface MatchingStrategy
method
- A method
ValueCreationStrategy
should be appliedpublic boolean matchesByType(Class<?> clazz)
MatchingStrategy
matchesByType
in interface MatchingStrategy
clazz
- a clazz type
ValueCreationStrategy
should be applied
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |