Interface IScriptCoreAccess

    • Method Detail

      • getComponents

        java.util.List<IComponentAccess> getComponents()
        Gets a list of all components of the software system
        Returns:
        Component list
      • createVisitor

        ICoreVisitor createVisitor()
        Create a new language agnostic visitor.
        Returns:
        a new visitor
      • createArchitectureVisitor

        IArchitectureVisitor createArchitectureVisitor()
        Create a new visitor for architectural models.
        Returns:
        a new visitor
      • findElementByFqn

        INamedElementAccess findElementByFqn​(java.lang.String fqn)
        Find an element by its fully qualified name
        Parameters:
        fqn - The fully qualified name of the element (to be found in Sonargraph properties view). Must not be null, empty or contain only whitespace.
        Returns:
        The element or null, if no element with that fully qualified name can be found.
      • visitModel

        void visitModel​(ICoreVisitor visitor)
        Visit the complete model
        Parameters:
        visitor - the visitor
      • visitParserModel

        void visitParserModel​(ICoreVisitor visitor)
        Visit only the parser model
        Parameters:
        visitor - the visitor
      • visitLogicalModuleNamespaces

        void visitLogicalModuleNamespaces​(ICoreVisitor visitor)
        Visit module level logical namespaces
        Parameters:
        visitor - the visitor
      • visitLogicalSystemNamespaces

        void visitLogicalSystemNamespaces​(ICoreVisitor visitor)
        Visit system level logical namespaces
        Parameters:
        visitor - the visitor
      • visitActiveArchitectureModels

        void visitActiveArchitectureModels​(IArchitectureVisitor visitor)
        Visit all active architectural models
        Parameters:
        visitor - the visitor
      • visitActiveArchitectureModel

        void visitActiveArchitectureModel​(IArchitectureVisitor visitor,
                                          java.lang.String name)
        Visit a specific active architecture model
        Parameters:
        visitor - the visitor
        name - the name of the model without extension
      • getBaseDirectory

        java.io.File getBaseDirectory()
        Returns:
        the directory of the Sonargraph system definition
      • findTypes

        SearchResult<? extends ITypeAccess> findTypes​(groovy.lang.Closure<java.lang.Boolean> predicate,
                                                      int limit)
      • findFields

        SearchResult<? extends IFieldAccess> findFields​(com.hello2morrow.sonargraph.core.api.model.ElementAccess<? extends com.hello2morrow.sonargraph.core.model.element.NamedElement> searchRoot,
                                                        groovy.lang.Closure<java.lang.Boolean> predicate,
                                                        int limit)
      • findFields

        SearchResult<? extends IFieldAccess> findFields​(groovy.lang.Closure<java.lang.Boolean> predicate,
                                                        int limit)
      • findRoutines

        SearchResult<? extends IRoutineAccess> findRoutines​(com.hello2morrow.sonargraph.core.api.model.ElementAccess<? extends com.hello2morrow.sonargraph.core.model.element.NamedElement> searchRoot,
                                                            groovy.lang.Closure<java.lang.Boolean> predicate,
                                                            int limit)
      • findRoutines

        SearchResult<? extends IRoutineAccess> findRoutines​(groovy.lang.Closure<java.lang.Boolean> predicate,
                                                            int limit)
      • findMethods

        SearchResult<? extends IMethodAccess> findMethods​(com.hello2morrow.sonargraph.core.api.model.ElementAccess<? extends com.hello2morrow.sonargraph.core.model.element.NamedElement> searchRoot,
                                                          groovy.lang.Closure<java.lang.Boolean> predicate,
                                                          int limit)
      • findMethods

        SearchResult<? extends IMethodAccess> findMethods​(groovy.lang.Closure<java.lang.Boolean> predicate,
                                                          int limit)
      • getOrCreateMetricId

        com.hello2morrow.sonargraph.core.api.script.model.MetricIdAccess getOrCreateMetricId​(java.lang.String id,
                                                                                             java.lang.String presentationName,
                                                                                             java.lang.String description,
                                                                                             boolean isFloat,
                                                                                             java.lang.Number lowerThreshold,
                                                                                             java.lang.Number upperThreshold,
                                                                                             java.lang.Number bestValue,
                                                                                             java.lang.Number worstValue,
                                                                                             java.lang.String... categoryIds)
      • getOrCreateMetricId

        com.hello2morrow.sonargraph.core.api.script.model.MetricIdAccess getOrCreateMetricId​(java.lang.String id,
                                                                                             java.lang.String presentationName,
                                                                                             java.lang.String description,
                                                                                             boolean isFloat,
                                                                                             java.lang.Number lowerThreshold,
                                                                                             java.lang.Number upperThreshold,
                                                                                             com.hello2morrow.sonargraph.core.model.script.MetricSorting sorting,
                                                                                             double minValue,
                                                                                             double maxValue,
                                                                                             java.lang.String... categoryIds)
      • getOrCreateMetricId

        com.hello2morrow.sonargraph.core.api.script.model.MetricIdAccess getOrCreateMetricId​(java.lang.String id,
                                                                                             java.lang.String presentationName,
                                                                                             java.lang.String description,
                                                                                             boolean isFloat,
                                                                                             java.lang.Number lowerThreshold,
                                                                                             java.lang.Number upperThreshold,
                                                                                             java.lang.String... categoryIds)
      • getOrCreateMetricId

        com.hello2morrow.sonargraph.core.api.script.model.MetricIdAccess getOrCreateMetricId​(java.lang.String id,
                                                                                             java.lang.String presentationName,
                                                                                             java.lang.String description,
                                                                                             boolean isFloat,
                                                                                             java.lang.String... categoryIds)
      • getACDMetric

        java.lang.Float getACDMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getBiggestComponentCycleGroupMetric

        java.lang.Integer getBiggestComponentCycleGroupMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getCCDMetric

        java.lang.Integer getCCDMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getCodeCommentLinesMetric

        java.lang.Integer getCodeCommentLinesMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getCommentLinesMetric

        java.lang.Integer getCommentLinesMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getLinesOfCodeMetric

        java.lang.Integer getLinesOfCodeMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNCCDMetric

        java.lang.Float getNCCDMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfComponentCycleGroupsMetric

        java.lang.Integer getNumberOfComponentCycleGroupsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfComponentsMetric

        java.lang.Integer getNumberOfComponentsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfCyclicComponentsMetric

        java.lang.Integer getNumberOfCyclicComponentsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfIgnoredCyclicComponentsMetric

        java.lang.Integer getNumberOfIgnoredCyclicComponentsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfStatementsMetric

        java.lang.Integer getNumberOfStatementsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getPropagationCostMetric

        java.lang.Float getPropagationCostMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getSourceElementCountMetric

        java.lang.Integer getSourceElementCountMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getTotalLinesMetric

        java.lang.Integer getTotalLinesMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfCodeDuplicatesMetric

        java.lang.Integer getNumberOfCodeDuplicatesMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfDuplicatedLinesMetric

        java.lang.Integer getNumberOfDuplicatedLinesMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfIgnoredCodeDuplicatesMetric

        java.lang.Integer getNumberOfIgnoredCodeDuplicatesMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getBiggestModuleACDMetric

        java.lang.Float getBiggestModuleACDMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getComponentCyclicityMetric

        java.lang.Integer getComponentCyclicityMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getComponentRelativeCyclicityMetric

        java.lang.Float getComponentRelativeCyclicityMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getComponentStructuralDebtIndexMetric

        java.lang.Integer getComponentStructuralDebtIndexMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getComponentParserDependenciesToRemoveMetric

        java.lang.Integer getComponentParserDependenciesToRemoveMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getComponentDependenciesToRemoveMetric

        java.lang.Integer getComponentDependenciesToRemoveMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfUnassignedComponentsMetric

        java.lang.Integer getNumberOfUnassignedComponentsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfComponentViolationsMetric

        java.lang.Integer getNumberOfComponentViolationsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfViolatingComponentsMetric

        java.lang.Integer getNumberOfViolatingComponentsMetric()
        Returns:
        number of components with non-ignored outgoing architecture violations or 'null' if not available
      • getNumberOfAllViolatingComponentsMetric

        java.lang.Integer getNumberOfAllViolatingComponentsMetric()
        This method should no longer be used. Use the 'Parser' virtual model to obtain the unaltered metric. If you use this method the metric value might change depending on the selected virtual model.
        Returns:
        getNumberOfViolatingComponentsMetric().
      • getNumberOfParserDependencyViolationsMetric

        java.lang.Integer getNumberOfParserDependencyViolationsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfIgnoredParserDependencyViolationsMetric

        java.lang.Integer getNumberOfIgnoredParserDependencyViolationsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfModulesMetric

        java.lang.Integer getNumberOfModulesMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfCyclicModulesMetric

        java.lang.Integer getNumberOfCyclicModulesMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfArtifactsMetric

        java.lang.Integer getNumberOfArtifactsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfEmptyArtifactsMetric

        java.lang.Integer getNumberOfEmptyArtifactsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfComponntsInDeprectaedArtifactsMetric

        @Deprecated
        java.lang.Integer getNumberOfComponntsInDeprectaedArtifactsMetric()
        Deprecated.
        Returns:
        the corresponding metric or 'null' if not available
      • getNumberOfComponentsInDeprecatedArtifactsMetric

        java.lang.Integer getNumberOfComponentsInDeprecatedArtifactsMetric()
        Returns:
        the corresponding metric or 'null' if not available
      • getMaintainabilityLevelMetric

        java.lang.Float getMaintainabilityLevelMetric()
        Returns:
        the corresponding metric or 'null' if not available