|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.core.xml.scan.PatternBasedPackageScanFilter
public class PatternBasedPackageScanFilter
PatternBasedPackageScanFilter
uses an underlying
AntPathMatcher
to filter scanned files according to include and
exclude patterns.
AntPathMatcher
Constructor Summary | |
---|---|
PatternBasedPackageScanFilter()
|
Method Summary | |
---|---|
void |
addExcludePattern(String excludePattern)
add and exclude pattern to the filter. |
void |
addExcludePatterns(Collection<String> excludes)
|
void |
addIncludePattern(String includePattern)
add and include pattern to the filter. |
void |
addIncludePatterns(Collection<String> includes)
|
boolean |
matches(Class<?> candidateClass)
Tests if a given class matches the patterns in this filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PatternBasedPackageScanFilter()
Method Detail |
---|
public void addExcludePattern(String excludePattern)
public void addIncludePattern(String includePattern)
public void addIncludePatterns(Collection<String> includes)
public void addExcludePatterns(Collection<String> excludes)
public boolean matches(Class<?> candidateClass)
AntPathMatcher
if no include or exclude patterns are set then all classes match.
If the filter contains only include filters, then the candidate class must match one of the include patterns to match the filter and return true.
If the filter contains only exclude filters, then the filter will return true unless the candidate class matches an exclude pattern.
if this contains both include and exclude filters, then the above rules apply with excludes taking precedence over includes i.e. an include pattern of java.util.* and an exclude pattern of java.util.jar.* will include a file only if it is in the util pkg and not in the util.jar package.
matches
in interface org.apache.camel.spi.PackageScanFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |