public class MethodMatcher extends Object implements Matcher<MethodMetadata>
MethodMetadata specific implementation of Matcher. Matches
are based on field name which is dynamically determined based on: the
FieldMatchers presented; the type of method (accessor/mutator); the
default method name; the user specified method name obtained from a
particular Roo annotation; a plural/singular suffix of the referenced entity;
and, an additional suffix.| Constructor and Description |
|---|
MethodMatcher(Collection<? extends FieldMatcher> fieldTaggers,
org.springframework.roo.model.CustomDataKey<MethodMetadata> customDataKey,
boolean isAccessor)
Constructor
|
MethodMatcher(org.springframework.roo.model.CustomDataKey<MethodMetadata> customDataKey,
org.springframework.roo.model.JavaType catalystAnnotationType,
org.springframework.roo.model.JavaSymbolName userDefinedNameAttribute,
String defaultName)
Constructor
|
MethodMatcher(org.springframework.roo.model.CustomDataKey<MethodMetadata> customDataKey,
org.springframework.roo.model.JavaType catalystAnnotationType,
org.springframework.roo.model.JavaSymbolName userDefinedNameAttribute,
String defaultName,
boolean suffixPlural,
boolean suffixSingular)
Constructor
|
MethodMatcher(org.springframework.roo.model.CustomDataKey<MethodMetadata> customDataKey,
org.springframework.roo.model.JavaType catalystAnnotationType,
org.springframework.roo.model.JavaSymbolName userDefinedNameAttribute,
String defaultName,
boolean suffixPlural,
boolean suffixSingular,
String additionalSuffix)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.roo.model.CustomDataKey<MethodMetadata> |
getCustomDataKey()
Returns a key indicating the type of custom data returned by
Matcher.matches(List) |
Object |
getTagValue(MethodMetadata key)
Returns the value associated with the given key that should be applied to
the matched instance.
|
List<MethodMetadata> |
matches(List<MemberHoldingTypeDetails> memberHoldingTypeDetailsList)
Returns the
CustomDataAccessors for any elements of the given
list that meet this matcher's inclusion criteria. |
List<MethodMetadata> |
matches(List<MemberHoldingTypeDetails> memberHoldingTypeDetailsList,
Map<String,String> pluralMap) |
public MethodMatcher(Collection<? extends FieldMatcher> fieldTaggers, org.springframework.roo.model.CustomDataKey<MethodMetadata> customDataKey, boolean isAccessor)
fieldTaggers - can be null for nonecustomDataKey - isAccessor - public MethodMatcher(org.springframework.roo.model.CustomDataKey<MethodMetadata> customDataKey, org.springframework.roo.model.JavaType catalystAnnotationType, org.springframework.roo.model.JavaSymbolName userDefinedNameAttribute, String defaultName)
customDataKey - catalystAnnotationType - userDefinedNameAttribute - defaultName - public MethodMatcher(org.springframework.roo.model.CustomDataKey<MethodMetadata> customDataKey, org.springframework.roo.model.JavaType catalystAnnotationType, org.springframework.roo.model.JavaSymbolName userDefinedNameAttribute, String defaultName, boolean suffixPlural, boolean suffixSingular)
customDataKey - catalystAnnotationType - userDefinedNameAttribute - defaultName - suffixPlural - suffixSingular - public MethodMatcher(org.springframework.roo.model.CustomDataKey<MethodMetadata> customDataKey, org.springframework.roo.model.JavaType catalystAnnotationType, org.springframework.roo.model.JavaSymbolName userDefinedNameAttribute, String defaultName, boolean suffixPlural, boolean suffixSingular, String additionalSuffix)
customDataKey - catalystAnnotationType - userDefinedNameAttribute - defaultName - suffixPlural - suffixSingular - additionalSuffix - public org.springframework.roo.model.CustomDataKey<MethodMetadata> getCustomDataKey()
MatcherMatcher.matches(List)getCustomDataKey in interface Matcher<MethodMetadata>null keypublic Object getTagValue(MethodMetadata key)
MatchergetTagValue in interface Matcher<MethodMetadata>key - the custom data keypublic List<MethodMetadata> matches(List<MemberHoldingTypeDetails> memberHoldingTypeDetailsList)
MatcherCustomDataAccessors for any elements of the given
list that meet this matcher's inclusion criteria.matches in interface Matcher<MethodMetadata>memberHoldingTypeDetailsList - the list to check for matchesnull listpublic List<MethodMetadata> matches(List<MemberHoldingTypeDetails> memberHoldingTypeDetailsList, Map<String,String> pluralMap)
Copyright © 2009–2017. All rights reserved.