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

java.lang.Object
  extended by org.springframework.roo.classpath.customdata.taggers.ConstructorMatcher
All Implemented Interfaces:
Matcher<ConstructorMetadata>

public class ConstructorMatcher
extends Object
implements Matcher<ConstructorMetadata>

ConstructorMetadata-specific implementation of Matcher. Currently ConstructorMetadata instances are only matched based on parameter types.

Since:
1.1.3
Author:
James Tyrrell

Constructor Summary
ConstructorMatcher(org.springframework.roo.model.CustomDataKey<ConstructorMetadata> customDataKey, Collection<? extends org.springframework.roo.model.JavaType> parameterTypes)
          Constructor
ConstructorMatcher(org.springframework.roo.model.CustomDataKey<ConstructorMetadata> customDataKey, T... parameterTypes)
          Constructor
 
Method Summary
 org.springframework.roo.model.CustomDataKey<ConstructorMetadata> getCustomDataKey()
          Returns a key indicating the type of custom data returned by Matcher.matches(List)
 Object getTagValue(ConstructorMetadata key)
          Returns the value associated with the given key that should be applied to the matched instance.
 List<ConstructorMetadata> 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

ConstructorMatcher

public ConstructorMatcher(org.springframework.roo.model.CustomDataKey<ConstructorMetadata> customDataKey,
                          Collection<? extends org.springframework.roo.model.JavaType> parameterTypes)
Constructor

Parameters:
customDataKey - (required)
parameterTypes - can be null for none

ConstructorMatcher

public ConstructorMatcher(org.springframework.roo.model.CustomDataKey<ConstructorMetadata> customDataKey,
                          T... parameterTypes)
Constructor

Type Parameters:
T - JavaType or any subclass
Parameters:
customDataKey - (required)
parameterTypes -
Since:
1.2.0
Method Detail

getCustomDataKey

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

Specified by:
getCustomDataKey in interface Matcher<ConstructorMetadata>
Returns:
a non-null key

getTagValue

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

Specified by:
getTagValue in interface Matcher<ConstructorMetadata>
Parameters:
key - the custom data key
Returns:
a value (can be null)

matches

public List<ConstructorMetadata> 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.

Specified by:
matches in interface Matcher<ConstructorMetadata>
Parameters:
memberHoldingTypeDetailsList - the list to check for matches
Returns:
a non-null list


Copyright © 2009–2015. All rights reserved.