Package org.jboss.vfs.util
Class AbstractPatternVirtualFileFilter
- java.lang.Object
-
- org.jboss.vfs.util.AbstractPatternVirtualFileFilter
-
- All Implemented Interfaces:
VirtualFileFilter
- Direct Known Subclasses:
IncludePatternVirtualFileFilter
public abstract class AbstractPatternVirtualFileFilter extends java.lang.Object implements VirtualFileFilter
Regexp patter filter.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.regex.Pattern
pattern
-
Constructor Summary
Constructors Constructor Description AbstractPatternVirtualFileFilter(java.lang.String regexp)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
accepts(VirtualFile file)
Match the virtual fileprotected abstract boolean
doMatch()
Should we match the pattern.protected abstract java.lang.String
getMatchString(VirtualFile file)
Extract match string from file.
-
-
-
Method Detail
-
getMatchString
protected abstract java.lang.String getMatchString(VirtualFile file)
Extract match string from file.- Parameters:
file
- the file- Returns:
- extracted match string
-
doMatch
protected abstract boolean doMatch()
Should we match the pattern.- Returns:
- the match flag
-
accepts
public boolean accepts(VirtualFile file)
Description copied from interface:VirtualFileFilter
Match the virtual file- Specified by:
accepts
in interfaceVirtualFileFilter
- Parameters:
file
- the virtual file- Returns:
- true when it matches
-
-