com.togethersoft.modules.qa.utils
Class MetricsPluginImpl

java.lang.Object
  |
  +--com.togethersoft.modules.qa.utils.PluginImpl
        |
        +--com.togethersoft.modules.qa.utils.MetricsPluginImpl
All Implemented Interfaces:
MetricsPlugin, Plugin

public abstract class MetricsPluginImpl
extends PluginImpl
implements MetricsPlugin

Metrics plugin implementation - abstract class serving as ancestor for all metrics plugins


Fields inherited from class com.togethersoft.modules.qa.utils.PluginImpl
currCls, currMbr, emptyOptionsPane, level, PROC_ATTRS, PROC_OPERS, procGoal, stopIter, trace
 
Fields inherited from interface com.togethersoft.modules.qa.api.MetricsPlugin
AGGR_AVERAGE, AGGR_MAXIMUM, AGGR_MEDIAN, AGGR_MINIMUM, AGGR_NONE, AGGR_SUM, SCOPE_CLASS, SCOPE_PROJECT
 
Constructor Summary
MetricsPluginImpl()
           
 
Method Summary
 java.lang.String getDefaultAggregation()
          Gets default aggregation for plugin.
 int getDefaultLowerLimit()
          Gets default lower limit value
 int getDefaultUpperLimit()
          Gets default upper limit value
 java.lang.String getDescriptionFileName()
          Gets the of description file name of plugin By default, description file name is the same as plugin class file name but with the extemsion of ".html".
 java.lang.String getPropertiesFileName()
          Gets the of properties file name of plugin By default, properties file name is the same as plugin class file name but with the extemsion of ".properties".
 int getScope()
          Gets the possible scope of plugin operation - SCOPE_CLASS or SCOPE_PROJECT.
 boolean run(java.lang.String abbr, com.togethersoft.openapi.sci.SciObject obj, MetricsResult result)
          Plugin entry point.
 
Methods inherited from class com.togethersoft.modules.qa.utils.PluginImpl
canProcessByteCode, createOptionsPane, examineExpression, getAbbreviation, getDefaultChoice, getGroupName, getOptionsPane, getProperty, getProperty, getProperty, getTitle, indent, isByteCode, isDefaultPkg, load, prepare, process, processAttrib, processAttribs, processCaseStmt, processCatchStmt, processClass, processCodeBlock, processCompStmt, processConceptVar, processDeclStmt, processExpression, processExprStmt, processIfStmt, processInitValue, processLocalVar, processLoopStmt, processOper, processOpers, processParam, processReturnStmt, processStatement, processSwitchStmt, processThrowSpec, processThrowStmt, processTryStmt, putProperty, putProperty, putProperty, restoreOptions, storeOptions, traceAttr, traceExpr, traceOper, traceStmt, traceVar
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface com.togethersoft.modules.qa.api.MetricsPlugin
run
 
Methods inherited from interface com.togethersoft.modules.qa.api.Plugin
canProcessByteCode, createOptionsPane, getAbbreviation, getDefaultChoice, getGroupName, getOptionsPane, getTitle, load, prepare, restoreOptions, storeOptions
 

Constructor Detail

MetricsPluginImpl

public MetricsPluginImpl()
Method Detail

run

public boolean run(java.lang.String abbr,
                   com.togethersoft.openapi.sci.SciObject obj,
                   MetricsResult result)
Plugin entry point. It is invoked for every package and every class selected in diagram as well as for each their subpackage and subclass.
Parameters:
obj - Source Code Interface object to process
result - object to store processing results If returns false, further processing is stopped.
Returns:
true to proceed further objects, otherwise false

getScope

public int getScope()
Gets the possible scope of plugin operation - SCOPE_CLASS or SCOPE_PROJECT.
Specified by:
getScope in interface MetricsPlugin
Returns:
SCOPE_CLASS or SCOPE_PROJECT

getDefaultLowerLimit

public int getDefaultLowerLimit()
Gets default lower limit value
Specified by:
getDefaultLowerLimit in interface MetricsPlugin
Returns:
default lower limit value

getDefaultUpperLimit

public int getDefaultUpperLimit()
Gets default upper limit value
Specified by:
getDefaultUpperLimit in interface MetricsPlugin
Returns:
default upper limit value

getDefaultAggregation

public java.lang.String getDefaultAggregation()
Gets default aggregation for plugin. May be on of AGGR_NONE, AGGR_SUM, AGGR_AVERAGE, AGGR_MINIMUM, AGGR_MAXIMUM or AGGR_MEDIAN
Specified by:
getDefaultAggregation in interface MetricsPlugin
Returns:
default aggregation

getDescriptionFileName

public java.lang.String getDescriptionFileName()
Gets the of description file name of plugin By default, description file name is the same as plugin class file name but with the extemsion of ".html".
Specified by:
getDescriptionFileName in interface Plugin
Returns:
description file name

getPropertiesFileName

public java.lang.String getPropertiesFileName()
Gets the of properties file name of plugin By default, properties file name is the same as plugin class file name but with the extemsion of ".properties".
Specified by:
getPropertiesFileName in interface Plugin
Overrides:
getPropertiesFileName in class PluginImpl
Returns:
properties file name