Class PrefixTree

java.lang.Object
org.eclipse.aether.internal.impl.filter.ruletree.PrefixTree

public class PrefixTree extends Object
Prefix tree for paths: if you step on a path prefix that exists, you are good to go. This class parses a text file that has a prefix on each line:
  • ignored/formatting - each line starting with '#' (hash) or being empty/blank is ignored.
  • a path prefix ie "/org/apache/maven".
By default, artifact is allowed if layout converted path of it has a matching prefix in this file.

Example prefix files:

  • Constructor Details

  • Method Details

    • isLeaf

      public boolean isLeaf()
    • loadNodes

      public int loadNodes(Stream<String> linesStream)
    • loadNode

      public boolean loadNode(String line)
      Adds a line to the tree:
      • it parses the URI-path-like element into list of segments elementsOfPath(String)
      • cycles over the list, and marks last node added as leaf=true
      • if already on leaf node, processing stops (shorter path wins)
    • acceptedPath

      public boolean acceptedPath(String path)