org.springframework.roo.classpath.customdata.taggers
Class AnnotatedTypeMatcher

java.lang.Object
  extended by org.springframework.roo.classpath.customdata.taggers.TypeMatcher
      extended by org.springframework.roo.classpath.customdata.taggers.AnnotatedTypeMatcher
All Implemented Interfaces:
Matcher<MemberHoldingTypeDetails>
Direct Known Subclasses:
LayerTypeMatcher

public class AnnotatedTypeMatcher
extends TypeMatcher

A TypeMatcher that looks for any of a given set of annotations.

Author:
James Tyrrell

Constructor Summary
AnnotatedTypeMatcher(org.springframework.roo.model.CustomDataKey<MemberHoldingTypeDetails> customDataKey, org.springframework.roo.model.JavaType... annotationTypesToMatchOn)
          Constructor
 
Method Summary
 org.springframework.roo.model.CustomDataKey<MemberHoldingTypeDetails> getCustomDataKey()
          Returns a key indicating the type of custom data returned by Matcher.matches(List)
 Object getTagValue(MemberHoldingTypeDetails key)
          Returns the value associated with the given key that should be applied to the matched instance.
 List<MemberHoldingTypeDetails> matches(List<MemberHoldingTypeDetails> memberHoldingTypeDetailsList)
          Returns the CustomDataAccessors for any elements of the given list that meet this matcher's inclusion criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotatedTypeMatcher

public AnnotatedTypeMatcher(org.springframework.roo.model.CustomDataKey<MemberHoldingTypeDetails> customDataKey,
                            org.springframework.roo.model.JavaType... annotationTypesToMatchOn)
Constructor

Parameters:
customDataKey - the CustomDataKey to apply (required)
annotationTypesToMatchOn -
Method Detail

getCustomDataKey

public org.springframework.roo.model.CustomDataKey<MemberHoldingTypeDetails> getCustomDataKey()
Description copied from interface: Matcher
Returns a key indicating the type of custom data returned by Matcher.matches(List)

Returns:
a non-null key

getTagValue

public Object getTagValue(MemberHoldingTypeDetails key)
Description copied from interface: Matcher
Returns the value associated with the given key that should be applied to the matched instance.

Parameters:
key - the custom data key
Returns:
a value (can be null)

matches

public List<MemberHoldingTypeDetails> matches(List<MemberHoldingTypeDetails> memberHoldingTypeDetailsList)
Description copied from interface: Matcher
Returns the CustomDataAccessors for any elements of the given list that meet this matcher's inclusion criteria.

Parameters:
memberHoldingTypeDetailsList - the list to check for matches
Returns:
a non-null list


Copyright © 2009–2015. All rights reserved.