Class AttributesNode

  • Direct Known Subclasses:
    GlobalAttributesNode, InfoAttributesNode

    public class AttributesNode
    extends Object
    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
    • Constructor Detail

      • AttributesNode

        public AttributesNode()
        Create an empty ignore node with no rules.
      • AttributesNode

        public AttributesNode​(List<AttributesRule> rules)
        Create an ignore node with given rules.
        Parameters:
        rules - list of rules.
    • Method Detail

      • parse

        public void parse​(InputStream in)
                   throws IOException
        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.
      • getRules

        public List<AttributesRule> getRules()
        Getter for the field rules.
        Returns:
        list of all ignore rules held by this node