Class RuleRegistry


  • public class RuleRegistry
    extends java.lang.Object
    Registry for rules. Uses Java Service Loader to discover implementations of the IRule interface.

    In order to add a new rule to the registry, create a new IRule implementation and add its fully qualified class name in a file named META-INF/services/org.openjdk.jmc.flightrecorder.rules.IRule (one line per class).

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Collection<IRule> RULES  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private RuleRegistry()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static void add​(IRule rule, java.util.Map<java.lang.String,​IRule> rulesById)  
      private static java.util.logging.Logger getLogger()  
      static java.util.Collection<IRule> getRules()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • RULES

        private static final java.util.Collection<IRule> RULES
    • Constructor Detail

      • RuleRegistry

        private RuleRegistry()
    • Method Detail

      • getLogger

        private static java.util.logging.Logger getLogger()
      • add

        private static void add​(IRule rule,
                                java.util.Map<java.lang.String,​IRule> rulesById)
      • getRules

        public static java.util.Collection<IRule> getRules()
        Returns:
        a collection of all registered rules