|
||||||||||
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.CaseInsensitiveMethodNameMatchingStrategy
public class CaseInsensitiveMethodNameMatchingStrategy
This value matching strategy matches string names case insensitively on the method name. This works for setter-based
blueprinting.
This MatchingStrategy
does never match by type.
Constructor Summary | |
---|---|
CaseInsensitiveMethodNameMatchingStrategy(String name)
Create a new CaseInsensitiveMethodNameMatchingStrategy which matches method names by default such as
'name' or 'setName' case insensitively. |
|
CaseInsensitiveMethodNameMatchingStrategy(String name,
String prefix)
Create a new CaseInsensitiveMethodNameMatchingStrategy which matches method names by default such as
'name' or prefix + 'Name' case insensitively. |
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)
This strategy does never match a type! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CaseInsensitiveMethodNameMatchingStrategy(String name)
CaseInsensitiveMethodNameMatchingStrategy
which matches method names by default such as
'name' or 'setName' case insensitively.
name
- The name to be matched (must not be empty or null
.public CaseInsensitiveMethodNameMatchingStrategy(String name, String prefix)
CaseInsensitiveMethodNameMatchingStrategy
which matches method names by default such as
'name' or prefix + 'Name' case insensitively.
name
- The name to be matched (must not be empty or null
.prefix
- An optional prefix that is matched before the name (default is 'set'). Maybe empty but not
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)
matchesByType
in interface MatchingStrategy
clazz
- a clazz type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |