Class CyclomaticComplexity
- java.lang.Object
- 
- com.ensoftcorp.open.commons.analyzers.Analyzer
- 
- com.ensoftcorp.open.commons.analyzers.Property
- 
- com.ensoftcorp.open.commons.analyzers.CyclomaticComplexity
 
 
 
- 
 public class CyclomaticComplexity extends Property An analyzer for cyclomatic complexity- Author:
- Ben Holland
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.ensoftcorp.open.commons.analyzers.AnalyzerAnalyzer.Result
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringRESULT_PREFIX
 - 
Constructor SummaryConstructors Constructor Description CyclomaticComplexity()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcyclomaticComplexity(com.ensoftcorp.atlas.core.db.graph.Node function, boolean includeExceptionControlFlows)Computes the cyclomatic complexity of a function as defined by https://en.wikipedia.org/wiki/Cyclomatic_complexityjava.lang.String[]getAssumptions()Returns an array of assumptions made when writing the analyzerjava.lang.StringgetDescription()Returns a short description of the analyzerjava.lang.StringgetName()Returns a name of the analyzerjava.util.Comparator<Analyzer.Result>getResultOrder()Sort results based on complexityjava.util.List<Analyzer.Result>getResults(com.ensoftcorp.atlas.core.query.Q context)Return analyzer's labeled results Results are for results within a given context- 
Methods inherited from class com.ensoftcorp.open.commons.analyzers.PropertygetCategory
 - 
Methods inherited from class com.ensoftcorp.open.commons.analyzers.Analyzerequals, getAllResults, getCodemapStageDependencies, getMarkup, getMarkupKey, hashCode
 
- 
 
- 
- 
- 
Field Detail- 
RESULT_PREFIXpublic static final java.lang.String RESULT_PREFIX - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Description copied from class:AnalyzerReturns a name of the analyzer
 - 
getDescriptionpublic java.lang.String getDescription() Description copied from class:AnalyzerReturns a short description of the analyzer- Specified by:
- getDescriptionin class- Analyzer
- Returns:
 
 - 
getAssumptionspublic java.lang.String[] getAssumptions() Description copied from class:AnalyzerReturns an array of assumptions made when writing the analyzer- Overrides:
- getAssumptionsin class- Analyzer
- Returns:
 
 - 
getResultspublic java.util.List<Analyzer.Result> getResults(com.ensoftcorp.atlas.core.query.Q context) Description copied from class:AnalyzerReturn analyzer's labeled results Results are for results within a given context- Specified by:
- getResultsin class- Analyzer
- Returns:
 
 - 
cyclomaticComplexitypublic static int cyclomaticComplexity(com.ensoftcorp.atlas.core.db.graph.Node function, boolean includeExceptionControlFlows)Computes the cyclomatic complexity of a function as defined by https://en.wikipedia.org/wiki/Cyclomatic_complexity- Parameters:
- function-
- includeExceptionControlFlows- If true exception control flow graph edges will be included in the result
- Returns:
 
 - 
getResultOrderpublic java.util.Comparator<Analyzer.Result> getResultOrder() Sort results based on complexity- Overrides:
- getResultOrderin class- Analyzer
- Returns:
 
 
- 
 
-