Class RoutineAccess
- java.lang.Object
- 
- com.hello2morrow.sonargraph.core.api.model.ElementAccess<com.hello2morrow.sonargraph.core.model.programming.ProgrammingElement>
- 
- com.hello2morrow.sonargraph.core.api.model.ProgrammingElementAccess
- 
- com.hello2morrow.sonargraph.core.api.model.RoutineAccess
 
 
 
- 
- All Implemented Interfaces:
- IElementAccess,- INamedElementAccess,- IProgrammingElementAccess,- IRoutineAccess
 - Direct Known Subclasses:
- CppFunctionAccess,- GenericFunctionAccess,- MethodAccess,- PythonFunctionAccess
 
 public class RoutineAccess extends ProgrammingElementAccess implements IRoutineAccess Access object for routines, i.e. functions (C/C++) and member functions (methods)
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.hello2morrow.sonargraph.core.api.model.ElementAccessElementAccess.IAccessFactory
 - 
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.model.INamedElementAccessINamedElementAccess.INamedElementAccessVisitor
 - 
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.model.IProgrammingElementAccessIProgrammingElementAccess.IVisitor
 - 
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.model.IRoutineAccessIRoutineAccess.IVisitor
 
- 
 - 
Constructor SummaryConstructors Constructor Description RoutineAccess(com.hello2morrow.sonargraph.core.model.programming.IRoutine element)Internal use only
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(INamedElementAccess.INamedElementAccessVisitor visitor)InternalintgetCyclomaticComplexityMetric()Get the cyclomatic complexity number for this routine.intgetExtendedCyclomaticComplexityMetric()Get the extended cyclomatic complexity number for this routine.intgetMaxNesting()Get the deepest block nesting within the routine body - often used as a good complexity indicatorjava.lang.ObjectgetMetricLevel()Internal use onlyintgetModifiedCyclomaticComplexityMetric()Get the modified cyclomatic complexity number for this routine.intgetModifiedExtendedCyclomaticComplexityMetric()Get the modified extended cyclomatic complexity number for this routine.intgetNumberOfParametersMetric()Return the number of parameters of this routine.intgetNumberOfStatementsMetric()Return the number of statements in this routine.java.util.List<java.lang.String>getParameterTypes()Return a list of fully qualified parameter types.java.lang.StringgetReturnType()Return the fully qualified name of the return type.- 
Methods inherited from class com.hello2morrow.sonargraph.core.api.model.ProgrammingElementAccessgetDirectory, getIncomingDependencies, getIncomingDependencies, getIncomingDependenciesRecursively, getIncomingDependenciesRecursively, getLineNumber, getModule, getModuleNamespace, getOutgoingDependencies, getOutgoingDependencies, getOutgoingDependencies, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getReferencedElements, getReferencedElements, getReferencedElements, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencingElements, getReferencingElements, getReferencingElementsRecursively, getReferencingElementsRecursively, getRootDirectory, getSourceFile, getSystemNamespace, isDefinedInEnclosingElement
 - 
Methods inherited from class com.hello2morrow.sonargraph.core.api.model.ElementAccessequals, getChildren, getElement, getFullyQualifiedName, getIssueCount, getName, getNameWithSignature, getParent, getParent, getShortName, getShortNameWithSignature, hashCode, ignoreIssues, isExcluded, isExternal, setFactory, toString
 - 
Methods inherited from interface com.hello2morrow.sonargraph.api.model.IElementAccessgetName, getNameWithSignature, getShortName, getShortNameWithSignature, ignoreIssues, isExcluded, isExternal
 - 
Methods inherited from interface com.hello2morrow.sonargraph.api.model.INamedElementAccessgetChildren, getFullyQualifiedName, getIncomingDependenciesRecursively, getIncomingDependenciesRecursively, getIssueCount, getIssueCount, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getParent, getParent, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencingElementsRecursively, getReferencingElementsRecursively
 - 
Methods inherited from interface com.hello2morrow.sonargraph.api.model.IProgrammingElementAccessgetDirectory, getIncomingDependencies, getIncomingDependencies, getLineNumber, getModule, getModuleNamespace, getOutgoingDependencies, getOutgoingDependencies, getOutgoingDependencies, getReferencedElements, getReferencedElements, getReferencedElements, getReferencingElements, getReferencingElements, getRootDirectory, getSourceFile, getSystemNamespace, isDefinedInEnclosingElement
 
- 
 
- 
- 
- 
Method Detail- 
getMetricLevelpublic java.lang.Object getMetricLevel() Description copied from class:ElementAccessInternal use only- Overrides:
- getMetricLevelin class- ProgrammingElementAccess
 
 - 
getReturnTypepublic java.lang.String getReturnType() Return the fully qualified name of the return type.- Returns:
- fully qualified return type
 
 - 
getParameterTypespublic java.util.List<java.lang.String> getParameterTypes() Return a list of fully qualified parameter types.- Returns:
- List of fully qualified parameter types.
 
 - 
getNumberOfParametersMetricpublic int getNumberOfParametersMetric() Return the number of parameters of this routine.- Specified by:
- getNumberOfParametersMetricin interface- IRoutineAccess
- Returns:
- see above
 
 - 
getNumberOfStatementsMetricpublic int getNumberOfStatementsMetric() Return the number of statements in this routine. Will return zero for routines without a body.- Specified by:
- getNumberOfStatementsMetricin interface- IRoutineAccess
- Returns:
- see above
 
 - 
getCyclomaticComplexityMetricpublic int getCyclomaticComplexityMetric() Get the cyclomatic complexity number for this routine. (Thomas McCabe)- Specified by:
- getCyclomaticComplexityMetricin interface- IRoutineAccess
- Returns:
- see above
 
 - 
getExtendedCyclomaticComplexityMetricpublic int getExtendedCyclomaticComplexityMetric() Get the extended cyclomatic complexity number for this routine. This will also add 1 for each '||' and '&&' operator (Thomas McCabe)- Specified by:
- getExtendedCyclomaticComplexityMetricin interface- IRoutineAccess
- Returns:
- see above
 
 - 
getModifiedExtendedCyclomaticComplexityMetricpublic int getModifiedExtendedCyclomaticComplexityMetric() Get the modified extended cyclomatic complexity number for this routine. (Thomas McCabe)- Specified by:
- getModifiedExtendedCyclomaticComplexityMetricin interface- IRoutineAccess
- Returns:
- see above
- See Also:
- getExtendedCyclomaticComplexityMetric(),- getModifiedCyclomaticComplexityMetric()
 
 - 
getModifiedCyclomaticComplexityMetricpublic int getModifiedCyclomaticComplexityMetric() Get the modified cyclomatic complexity number for this routine. This only adds 1 for switch statements, ignoring the number of 'case' labels (Thomas McCabe)- Specified by:
- getModifiedCyclomaticComplexityMetricin interface- IRoutineAccess
- Returns:
- see above
 
 - 
getMaxNestingpublic int getMaxNesting() Get the deepest block nesting within the routine body - often used as a good complexity indicator- Specified by:
- getMaxNestingin interface- IRoutineAccess
- Returns:
- see above
 
 - 
acceptpublic void accept(INamedElementAccess.INamedElementAccessVisitor visitor) Internal- Specified by:
- acceptin interface- INamedElementAccess
- Overrides:
- acceptin class- ProgrammingElementAccess
- Parameters:
- visitor- The visitor implementation
 
 
- 
 
-