Package org.eclipse.jgit.attributes
Class AttributesNode
java.lang.Object
org.eclipse.jgit.attributes.AttributesNode
- Direct Known Subclasses:
DfsRepository.EmptyAttributesNodeProvider.EmptyAttributesNode
,DirCacheIterator.LazyLoadingAttributesNode
,GlobalAttributesNode
,InfoAttributesNode
,WorkingTreeIterator.PerDirectoryAttributesNode
Represents a bundle of attributes inherited from a base directory.
This class is not thread safe, it maintains state about the last match.
- Since:
- 3.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<AttributesRule> The rules that have been parsed into this node. -
Constructor Summary
ConstructorsConstructorDescriptionCreate an empty ignore node with no rules.AttributesNode
(List<AttributesRule> rules) Create an ignore node with given rules. -
Method Summary
Modifier and TypeMethodDescriptionprivate static BufferedReader
asReader
(InputStream in) getRules()
Getter for the fieldrules
.void
parse
(InputStream in) Parse files according to gitattribute standards.
-
Field Details
-
rules
The rules that have been parsed into this node.
-
-
Constructor Details
-
AttributesNode
public AttributesNode()Create an empty ignore node with no rules. -
AttributesNode
Create an ignore node with given rules.- Parameters:
rules
- list of rules.
-
-
Method Details
-
parse
Parse files according to gitattribute standards.- Parameters:
in
- input stream holding the standard ignore format. The caller is responsible for closing the stream.- Throws:
IOException
- Error thrown when reading an ignore file.
-
asReader
-
getRules
Getter for the fieldrules
.- Returns:
- list of all ignore rules held by this node
-