|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.ignore.IgnoreRule
public class IgnoreRule
A single ignore rule corresponding to one line in a .gitignore or ignore file. Parses the ignore pattern Inspiration from: Ferry Huberts
Constructor Summary | |
---|---|
IgnoreRule(String pattern)
Create a new ignore rule with the given pattern. |
Method Summary | |
---|---|
boolean |
dirOnly()
|
boolean |
getNameOnly()
|
boolean |
getNegation()
|
String |
getPattern()
|
boolean |
getResult()
If a call to isMatch(String, boolean) was previously
made, this will return whether or not the target was ignored. |
boolean |
isMatch(String target,
boolean isDirectory)
Returns true if a match was made. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IgnoreRule(String pattern)
pattern
- Base pattern for the ignore rule. This pattern will
be parsed to generate rule parameters.Method Detail |
---|
public boolean getNameOnly()
public boolean dirOnly()
public boolean getNegation()
public String getPattern()
public boolean isMatch(String target, boolean isDirectory)
getResult()
for the ignore status. The actual
ignore status may be true or false depending on whether this rule is
an ignore rule or a negation rule.
target
- Name pattern of the file, relative to the base directory of this ruleisDirectory
- Whether the target file is a directory or not
getResult()
for the result.public boolean getResult()
isMatch(String, boolean)
was previously
made, this will return whether or not the target was ignored. Otherwise
this just indicates whether the rule is non-negation or negation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |