Class MatcherBuilderTracker

java.lang.Object
org.apache.rat.configuration.MatcherBuilderTracker

public final class MatcherBuilderTracker extends Object
A class to track the Matcher Builders as they are defined. Matchers may be defined in multiple configuration files. This class tracks them so that they can be referenced across the configuration files.
  • Method Details

    • instance

      public static MatcherBuilderTracker instance()
      Gets the instance of the MatcherBuilderTracker.
      Returns:
      the instance of the MatcherBuilderTracker.
    • addBuilder

      public static void addBuilder(String className, String name)
      Adds a builder to the tracker. If the name is null then the builder class name simple is used with the "Builder" suffix removed.
      Parameters:
      className - the Class name for the builder.
      name - the short name for the builder.
    • getMatcherBuilder

      public static AbstractBuilder getMatcherBuilder(String name)
      Get the matching builder for the name.
      Parameters:
      name - The name of the builder.
      Returns:
      the builder for that name. (not null)
    • getClasses

      public Collection<Class<? extends AbstractBuilder>> getClasses()
      Gets a collection of classes that are recognized as builders.
      Returns:
      the collection of builder classes