Coverage Report - com.sdmetrics.metrics.MetricProcedureCache - www.sdmetrics.com
 
Classes in this File Line Coverage Branch Coverage Complexity
MetricProcedureCache
100%
18/18
N/A
1
 
 1  
 package com.sdmetrics.metrics;
 2  
 
 3  
 /** Cache for metric calculation procedures. */
 4  
 class MetricProcedureCache extends ProcedureCache<MetricProcedure> {
 5  
 
 6  
         /**
 7  
          * Creates a new cache and registers the standard procedures that come with
 8  
          * SDMetrics.
 9  
          */
 10  
         MetricProcedureCache() {
 11  174
                 super("metric procedure");
 12  174
                 addProcedureClass("projection", MetricProcedureProjection.class);
 13  174
                 addProcedureClass("compoundmetric", MetricProcedureCompound.class);
 14  174
                 addProcedureClass("nesting", MetricProcedureNesting.class);
 15  174
                 addProcedureClass("attributevalue", MetricProcedureAttributeValue.class);
 16  174
                 addProcedureClass("count", MetricProcedureCount.class);
 17  174
                 addProcedureClass("subelements", MetricProcedureSubelements.class);
 18  174
                 addProcedureClass("signature", MetricProcedureSignature.class);
 19  348
                 addProcedureClass("connectedcomponents",
 20  174
                                 MetricProcedureConnectedComponents.class);
 21  174
                 addProcedureClass("compare", MetricProcedureCompare.class);
 22  174
                 addProcedureClass("filtervalue", MetricProcedureFilterValue.class);
 23  348
                 addProcedureClass("valuesetcount",
 24  174
                                 MetricProcedureValuesetOperation.class);
 25  174
                 addProcedureClass("setoperation", MetricProcedureSetOperation.class);
 26  174
                 addProcedureClass("substring", MetricProcedureSubString.class);
 27  174
         }
 28  
 
 29  
         @Override
 30  
         protected Class<? extends MetricProcedure> loadClass(String className)
 31  
                         throws ClassNotFoundException {
 32  151
                 return Class.forName(className).asSubclass(MetricProcedure.class);
 33  
         }
 34  
 }