Package org.apache.rat.configuration
Class MatcherBuilderTracker
java.lang.Object
org.apache.rat.configuration.MatcherBuilderTracker
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 Summary
Modifier and TypeMethodDescriptionstatic void
addBuilder
(String className, String name) Adds a builder to the tracker.Collection
<Class<? extends AbstractBuilder>> Gets a collection of classes that are recognized as builders.static AbstractBuilder
getMatcherBuilder
(String name) Get the matching builder for the name.static MatcherBuilderTracker
instance()
Gets the instance of the MatcherBuilderTracker.
-
Method Details
-
instance
Gets the instance of the MatcherBuilderTracker.- Returns:
- the instance of the MatcherBuilderTracker.
-
addBuilder
Adds a builder to the tracker. If thename
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
Get the matching builder for the name.- Parameters:
name
- The name of the builder.- Returns:
- the builder for that name. (not null)
-
getClasses
Gets a collection of classes that are recognized as builders.- Returns:
- the collection of builder classes
-