Coverage Report - com.sdmetrics.metrics.RuleProcedureCache - www.sdmetrics.com
 
Classes in this File Line Coverage Branch Coverage Complexity
RuleProcedureCache
100%
9/9
N/A
1
 
 1  
 package com.sdmetrics.metrics;
 2  
 
 3  
 /** Cache for rule calculation procedures. */
 4  
 class RuleProcedureCache extends ProcedureCache<RuleProcedure> {
 5  
 
 6  
         /**
 7  
          * Creates a new cache and registers the standard procedures that come with
 8  
          * SDMetrics.
 9  
          */
 10  
         RuleProcedureCache() {
 11  174
                 super("rule procedure");
 12  174
                 addProcedureClass("violation", RuleProcedureViolation.class);
 13  174
                 addProcedureClass("cycle", RuleProcedureCycle.class);
 14  174
                 addProcedureClass("projection", RuleProcedureSet.class);
 15  174
                 addProcedureClass("compoundset", RuleProcedureSet.class);
 16  174
                 addProcedureClass("compare", RuleProcedureSet.class);
 17  174
                 addProcedureClass("valueset", RuleProcedureSet.class);
 18  174
         }
 19  
 
 20  
         @Override
 21  
         protected Class<? extends RuleProcedure> loadClass(String className)
 22  
                         throws ClassNotFoundException {
 23  150
                 return Class.forName(className).asSubclass(RuleProcedure.class);
 24  
         }
 25  
 }