|
|
@ -81,7 +81,9 @@ public class IgnoreNode { |
|
|
|
/** The rules that have been parsed into this node. */ |
|
|
|
/** The rules that have been parsed into this node. */ |
|
|
|
private final List<FastIgnoreRule> rules; |
|
|
|
private final List<FastIgnoreRule> rules; |
|
|
|
|
|
|
|
|
|
|
|
/** Create an empty ignore node with no rules. */ |
|
|
|
/** |
|
|
|
|
|
|
|
* Create an empty ignore node with no rules. |
|
|
|
|
|
|
|
*/ |
|
|
|
public IgnoreNode() { |
|
|
|
public IgnoreNode() { |
|
|
|
rules = new ArrayList<>(); |
|
|
|
rules = new ArrayList<>(); |
|
|
|
} |
|
|
|
} |
|
|
@ -91,7 +93,7 @@ public class IgnoreNode { |
|
|
|
* |
|
|
|
* |
|
|
|
* @param rules |
|
|
|
* @param rules |
|
|
|
* list of rules. |
|
|
|
* list of rules. |
|
|
|
**/ |
|
|
|
*/ |
|
|
|
public IgnoreNode(List<FastIgnoreRule> rules) { |
|
|
|
public IgnoreNode(List<FastIgnoreRule> rules) { |
|
|
|
this.rules = rules; |
|
|
|
this.rules = rules; |
|
|
|
} |
|
|
|
} |
|
|
@ -102,7 +104,7 @@ public class IgnoreNode { |
|
|
|
* @param in |
|
|
|
* @param in |
|
|
|
* input stream holding the standard ignore format. The caller is |
|
|
|
* input stream holding the standard ignore format. The caller is |
|
|
|
* responsible for closing the stream. |
|
|
|
* responsible for closing the stream. |
|
|
|
* @throws IOException |
|
|
|
* @throws java.io.IOException |
|
|
|
* Error thrown when reading an ignore file. |
|
|
|
* Error thrown when reading an ignore file. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void parse(InputStream in) throws IOException { |
|
|
|
public void parse(InputStream in) throws IOException { |
|
|
@ -122,7 +124,11 @@ public class IgnoreNode { |
|
|
|
return new BufferedReader(new InputStreamReader(in, Constants.CHARSET)); |
|
|
|
return new BufferedReader(new InputStreamReader(in, Constants.CHARSET)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** @return list of all ignore rules held by this node. */ |
|
|
|
/** |
|
|
|
|
|
|
|
* Get list of all ignore rules held by this node |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return list of all ignore rules held by this node |
|
|
|
|
|
|
|
*/ |
|
|
|
public List<FastIgnoreRule> getRules() { |
|
|
|
public List<FastIgnoreRule> getRules() { |
|
|
|
return Collections.unmodifiableList(rules); |
|
|
|
return Collections.unmodifiableList(rules); |
|
|
|
} |
|
|
|
} |
|
|
@ -194,6 +200,7 @@ public class IgnoreNode { |
|
|
|
return MatchResult.CHECK_PARENT; |
|
|
|
return MatchResult.CHECK_PARENT; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** {@inheritDoc} */ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
return rules.toString(); |
|
|
|
return rules.toString(); |
|
|
|