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.Patternpattern
-
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 booleanaccepts(VirtualFile file)Match the virtual fileprotected abstract booleandoMatch()Should we match the pattern.protected abstract java.lang.StringgetMatchString(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:VirtualFileFilterMatch the virtual file- Specified by:
acceptsin interfaceVirtualFileFilter- Parameters:
file- the virtual file- Returns:
- true when it matches
-
-