Package org.apache.ivy.core.module.id
Class MatcherLookup
- java.lang.Object
-
- org.apache.ivy.core.module.id.MatcherLookup
-
public class MatcherLookup extends java.lang.Object
This class targets to speed up lookup for exact pattern matcher by keys, which are created with (organization, module) information. When exact pattern matcher is added, the key is created from matcher's attributes. When matcher is looked up against specific module, the key is recreated from module's attributes.
-
-
Constructor Summary
Constructors Constructor Description MatcherLookup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(MapMatcher matcher)
Add matcher.java.util.List
get(java.util.Map attrs)
Get a list of matchers which can apply to module with specified attributes
-
-
-
Method Detail
-
add
public void add(MapMatcher matcher)
Add matcher. If matcher is exact pattern matcher, it will be associated with a key and placed in keyed collection. If matcher is not exact pattern matcher, it will be placed into non-keyed collection- Parameters:
matcher
-
-
get
public java.util.List get(java.util.Map attrs)
Get a list of matchers which can apply to module with specified attributes- Parameters:
attrs
- A map of attributes that matcher should match.- Returns:
- list A list of candidate matchers that matches specified attributes
-
-