org.opensolaris.opengrok.index
Class IgnoredNames

java.lang.Object
  extended by org.opensolaris.opengrok.index.IgnoredNames
All Implemented Interfaces:
java.io.Serializable

public final class IgnoredNames
extends java.lang.Object
implements java.io.Serializable

This class maintains a list of file names (like "cscope.out"), SRC_ROOT relative file paths (like "usr/src/uts" or "usr/src/Makefile"), and glob patterns (like .make.*) which opengrok should ignore.

See Also:
Serialized Form

Nested Class Summary
static class IgnoredNames.PatternList
          During the load of the configuration file, the framework will add entries to the ignored pattern list.
 
Constructor Summary
IgnoredNames()
           
 
Method Summary
 void add(java.lang.String pattern)
          Add a pattern to the list of patterns of filenames to ignore
 void addDefaultPatterns()
           
 void clear()
          Remove all installed patterns from the list of files to ignore
 java.util.List<java.lang.String> getIgnoredPatterns()
           
 boolean ignore(java.io.File file)
          Should the file be ignored or not?
 boolean ignore(java.lang.String name)
          Should the file be ignored or not?
 void setIgnoredPatterns(java.util.List<java.lang.String> ignoredPatterns)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IgnoredNames

public IgnoredNames()
Method Detail

getIgnoredPatterns

public java.util.List<java.lang.String> getIgnoredPatterns()

setIgnoredPatterns

public void setIgnoredPatterns(java.util.List<java.lang.String> ignoredPatterns)

add

public void add(java.lang.String pattern)
Add a pattern to the list of patterns of filenames to ignore

Parameters:
pattern - the pattern to ignore

clear

public void clear()
Remove all installed patterns from the list of files to ignore


ignore

public boolean ignore(java.io.File file)
Should the file be ignored or not?

Parameters:
file - the file to check
Returns:
true if this file should be ignored, false otherwise

ignore

public boolean ignore(java.lang.String name)
Should the file be ignored or not?

Parameters:
name - the name of the file to check
Returns:
true if this pathname should be ignored, false otherwise

addDefaultPatterns

public void addDefaultPatterns()