Class ElementAccess<T extends com.hello2morrow.sonargraph.core.model.element.Element>

    • Method Detail

      • getElement

        public T getElement()
        Internal use only
        Returns:
        n/a
      • getMetricLevel

        public java.lang.Object getMetricLevel()
        Internal use only
      • getName

        public final java.lang.String getName()
        The (full) name without (potential) signature parts.
        Specified by:
        getName in interface IElementAccess
        Returns:
        the (full) name without signature parts.
      • getShortName

        public final java.lang.String getShortName()
        The short name without (potential) signature parts.
        Specified by:
        getShortName in interface IElementAccess
        Returns:
        the short name without signature parts.
      • getNameWithSignature

        public final java.lang.String getNameWithSignature()
        The (full) name with (potential) signature parts.
        Specified by:
        getNameWithSignature in interface IElementAccess
        Returns:
        the (full) name with signature parts.
      • getShortNameWithSignature

        public final java.lang.String getShortNameWithSignature()
        The short name with potential signature parts.
        Specified by:
        getShortNameWithSignature in interface IElementAccess
        Returns:
        the short name with signature parts.
      • isExternal

        public boolean isExternal()
        The external state.
        Specified by:
        isExternal in interface IElementAccess
        Returns:
        'true' if external.
      • isExcluded

        public final boolean isExcluded()
        The exclusion state.
        Specified by:
        isExcluded in interface IElementAccess
        Returns:
        'true' if excluded.
      • ignoreIssues

        public final boolean ignoreIssues()
        Issues of elements matched by the issue filter (workspace setup) should be ignored.
        Specified by:
        ignoreIssues in interface IElementAccess
        Returns:
        'true' if this element's issues are to be ignored.
      • getOutgoingDependenciesRecursively

        public java.util.List<IAggregatedDependencyAccess> getOutgoingDependenciesRecursively​(Aggregator aggr,
                                                                                              boolean excludeSelf,
                                                                                              boolean excludeExternals,
                                                                                              boolean excludeExcluded,
                                                                                              IDependencyKind... types)
        Compute the outgoing aggregated dependencies of this element and all its children.
        Specified by:
        getOutgoingDependenciesRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude all dependencies targeting this object or its children
        excludeExternals - If true, exclude all dependencies targeting external objects.
        excludeExcluded - If true, exclude all dependencies targeting excluded objects.
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of dependencies aggregated to the desired level
      • getOutgoingDependenciesRecursively

        public java.util.List<IAggregatedDependencyAccess> getOutgoingDependenciesRecursively​(Aggregator aggr,
                                                                                              boolean excludeSelf,
                                                                                              boolean excludeExternals,
                                                                                              IDependencyKind... types)
        Compute the outgoing aggregated dependencies of this element and all its children.
        Specified by:
        getOutgoingDependenciesRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude all dependencies targeting this object or its children
        excludeExternals - If true, exclude all dependencies targeting external objects.
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of dependencies aggregated to the desired level
      • getOutgoingDependenciesRecursively

        public java.util.List<IAggregatedDependencyAccess> getOutgoingDependenciesRecursively​(Aggregator aggr,
                                                                                              boolean excludeSelf,
                                                                                              IDependencyKind... types)
        Compute the outgoing aggregated dependencies of this element and all its children.
        Specified by:
        getOutgoingDependenciesRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude all dependencies targeting this object or its children
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of dependencies aggregated to the desired level
      • getIncomingDependenciesRecursively

        public java.util.List<IAggregatedDependencyAccess> getIncomingDependenciesRecursively​(Aggregator aggr,
                                                                                              boolean excludeSelf,
                                                                                              boolean excludeExcluded,
                                                                                              IDependencyKind... types)
        Compute the incoming aggregated dependencies of this element and all its children.
        Specified by:
        getIncomingDependenciesRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude all dependencies coming from this object or its children
        excludeExcluded - If true, exclude all dependencies coming from excluded elements
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of incoming dependencies aggregated to the desired level
      • getIncomingDependenciesRecursively

        public java.util.List<IAggregatedDependencyAccess> getIncomingDependenciesRecursively​(Aggregator aggr,
                                                                                              boolean excludeSelf,
                                                                                              IDependencyKind... types)
        Compute the incoming aggregated dependencies of this element and all its children, excluding excluded elements.
        Specified by:
        getIncomingDependenciesRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude all dependencies coming from this object or its children
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of incoming dependencies aggregated to the desired level
      • getReferencedElementsRecursively

        public java.util.List<INamedElementAccess> getReferencedElementsRecursively​(Aggregator aggr,
                                                                                    boolean excludeSelf,
                                                                                    boolean excludeExternals,
                                                                                    boolean excludeExcluded,
                                                                                    IDependencyKind... types)
        Compute the list of referenced elements of this element and all its children.
        Specified by:
        getReferencedElementsRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude this object and its children from the resulting list
        excludeExternals - If true, exclude all external objects.
        excludeExcluded - If true, exclude all excluded objects.
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of referenced objects according to the aggregation level
      • getReferencedElementsRecursively

        public java.util.List<INamedElementAccess> getReferencedElementsRecursively​(Aggregator aggr,
                                                                                    boolean excludeSelf,
                                                                                    boolean excludeExternals,
                                                                                    IDependencyKind... types)
        Compute the list of referenced elements of this element and all its children, excluding excluded elements.
        Specified by:
        getReferencedElementsRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude this object and its children from the resulting list
        excludeExternals - If true, exclude all external objects.
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of referenced objects according to the aggregation level
      • getReferencedElementsRecursively

        public java.util.List<INamedElementAccess> getReferencedElementsRecursively​(Aggregator aggr,
                                                                                    boolean excludeSelf,
                                                                                    IDependencyKind... types)
        Compute the list of referenced elements of this element and all its children, including external elements, excluding excluded elements.
        Specified by:
        getReferencedElementsRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude this object and its children from the resulting list
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of referenced objects according to the aggregation level
      • getReferencingElementsRecursively

        public java.util.List<INamedElementAccess> getReferencingElementsRecursively​(Aggregator aggr,
                                                                                     boolean excludeSelf,
                                                                                     boolean excludeExcluded,
                                                                                     IDependencyKind... types)
        Get a list of all elements referencing this element and its children.
        Specified by:
        getReferencingElementsRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude this object and its children from the resulting list
        excludeExcluded - If true, exclude all excluded objects.
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of referencing objects according to the aggregation level.
      • getReferencingElementsRecursively

        public java.util.List<INamedElementAccess> getReferencingElementsRecursively​(Aggregator aggr,
                                                                                     boolean excludeSelf,
                                                                                     IDependencyKind... types)
        Get a list of all elements referencing this element and its children, excluding excluded elements.
        Specified by:
        getReferencingElementsRecursively in interface INamedElementAccess
        Parameters:
        aggr - The desired level of aggregation
        excludeSelf - If true, exclude this object and its children from the resulting list
        types - List of dependency types (if empty, all dependencies will be returned)
        Returns:
        List of referencing objects according to the aggregation level.
      • getIssueCount

        public int getIssueCount​(java.util.List<java.lang.String> categories,
                                 java.util.List<java.lang.String> issueIds,
                                 java.util.List<java.lang.String> providers,
                                 java.util.List<java.lang.String> severities,
                                 boolean recursive)
        Description copied from interface: INamedElementAccess
        Counts total number of issues for this element for the given filter parameters.
        Specified by:
        getIssueCount in interface INamedElementAccess
        Parameters:
        categories - Issue categories (empty list means 'all")
        issueIds - Issue Id's (empty list mean all, listed under issue type in properties vieww)
        providers - Issue providers (empty list means 'all")
        severities - Issue severities (empty list means 'all")
        recursive - Add direct and indirect children's issues to count
        Returns:
        Total number of issues matching the filter criteria
      • getParent

        public final <P extends INamedElementAccess> P getParent​(java.lang.Class<P> clazz)
        Specified by:
        getParent in interface INamedElementAccess
        Parameters:
        clazz - class of the parent.
        Returns:
        the first matching parent of this element matching the given class or null if no parent exists or no parent of the specified class exists.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • getFullyQualifiedName

        public java.lang.String getFullyQualifiedName()
        Specified by:
        getFullyQualifiedName in interface INamedElementAccess
        Returns:
        the fully qualified name as shown in the Sonargraph properties view