Package com.hello2morrow.sonargraph.api
Interface INamedElementAccess
- All Superinterfaces:
IElementAccess
- All Known Subinterfaces:
IArchitectureBaseElementAccess
,IArchitectureModelAccess
,IArtifactAccess
,IAssignableElementAccess
,IBaseCoreAccess
,IConnectorAccess
,ICppSourceFileAccess
,ICSharpTypeAccess
,IDirectoryAccess
,IExternalAccess
,IFieldAccess
,IGenericClassAccess
,IGenericFieldAccess
,IGenericFunctionAccess
,IGenericMethodAccess
,IGenericProgrammingElementAccess
,IInterfaceAccess
,IJavaClassFileAccess
,IJavaFieldAccess
,IJavaLogicalModuleAccess
,IJavaLogicalPackageAccess
,IJavaMethodAccess
,IJavaModuleAccess
,IJavaSourceFileAccess
,IJavaSyntheticTypeAccess
,IJavaTypeAccess
,ILogicalExternalAccess
,ILogicalModuleAccess
,ILogicalNamespaceAccess
,ILogicalProgrammingElementAccess
,ILogicalSystemAccess
,IMethodAccess
,IModuleAccess
,INamespaceFragmentAccess
,IPluginCoreAccess
,IPluginLanguageBasedAccess
,IProgrammingElementAccess
,IPythonClassAccess
,IPythonExternalAccess
,IPythonFieldAccess
,IPythonFunctionAccess
,IPythonMethodAccess
,IPythonModuleAccess
,IPythonSourceFileAccess
,IPythonVariableAccess
,IRoutineAccess
,ISourceFileAccess
,ITypeAccess
,IUnassignedExternalAccess
,IUnassignedInternalAccess
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Visit this element.List
<? extends INamedElementAccess> Provides access to the children.getIncomingDependenciesRecursively
(Aggregator aggr, boolean excludeSelf, boolean excludeExcluded, IDependencyKind... types) Compute the incoming aggregated dependencies of this element and all its children.getIncomingDependenciesRecursively
(Aggregator aggr, boolean excludeSelf, IDependencyKind... types) Compute the incoming aggregated dependencies of this element and all its children, excluding excluded elements.int
Counts total number of issues for this element and it's children including secondary issues (cycle group issues, duplicate code block issues, architecture violations/deprecations).int
getIssueCount
(boolean includingSecondary, boolean recursive) Counts issues for this element.int
getIssueCount
(String category, String id, String provider, String severity, boolean recursive) Deprecated.int
getIssueCount
(List<String> categories, List<String> issueIds, List<String> providers, List<String> severities, boolean recursive) Deprecated.int
getIssueCount
(List<String> categories, List<String> issueIds, List<String> providers, List<String> severities, boolean includingSecondary, boolean recursive) Counts issues for this element for the given filter parameters.Collect all issues for this element and it's children including secondary issues (cycle group issues, duplicate code block issues, architecture violations/deprecations).getIssues
(boolean includingSecondary, boolean recursive) Collect issuesgetIssues
(List<String> categories, List<String> issueIds, List<String> providers, List<String> severities, boolean includingSecondary, boolean recursive) Collect issues for the given filter parameters.getOutgoingDependenciesRecursively
(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, boolean excludeExcluded, IDependencyKind... types) Compute the outgoing aggregated dependencies of this element and all its children.getOutgoingDependenciesRecursively
(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, IDependencyKind... types) Compute the outgoing aggregated dependencies of this element and all its children, excluding excluded elements.getOutgoingDependenciesRecursively
(Aggregator aggr, boolean excludeSelf, IDependencyKind... types) Compute the outgoing aggregated dependencies of this element and all its children, including external elements, excluding excluded elements.Provides access to the parent.<T extends INamedElementAccess>
TgetReferencedElementsRecursively
(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, boolean excludeExcluded, IDependencyKind... types) Compute the list of referenced elements of this element and all its children.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.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.getReferencingElementsRecursively
(Aggregator aggr, boolean excludeSelf, boolean excludeExcluded, IDependencyKind... types) Get a list of all elements referencing this element and its children.getReferencingElementsRecursively
(Aggregator aggr, boolean excludeSelf, IDependencyKind... types) Get a list of all elements referencing this element and its children, excluding excluded elements.Methods inherited from interface com.hello2morrow.sonargraph.api.IElementAccess
getName, getNameWithSignature, getShortName, getShortNameWithSignature, ignoreIssues, isExcluded, isExternal
-
Method Details
-
getParent
INamedElementAccess getParent()Provides access to the parent.- Returns:
- the parent or 'null' if there is no parent.
-
getChildren
List<? extends INamedElementAccess> getChildren()Provides access to the children.- Returns:
- List of children (might be empty).
-
getIssueCount
int getIssueCount()Counts total number of issues for this element and it's children including secondary issues (cycle group issues, duplicate code block issues, architecture violations/deprecations).- Returns:
- the issue count
-
getIssueCount
int getIssueCount(boolean includingSecondary, boolean recursive) Counts issues for this element.- Parameters:
includingSecondary
- Including secondary issues (cycle group issues, duplicate code block issues, architecture violations/deprecations)recursive
- Include children- Returns:
- Number of issues
-
getIssueCount
@Deprecated int getIssueCount(String category, String id, String provider, String severity, boolean recursive) Deprecated.Counts issues for this element for the given filter parameters.- Parameters:
category
- A category or null, if you want to match all categoriesid
- An issue id or null, if you want to match all id'sprovider
- A provider or null, if you want to match all providersseverity
- A severity or null, if you want to match all severitiesrecursive
- Include children- Returns:
- Number of issues matching the filter criteria
-
getIssueCount
@Deprecated int getIssueCount(List<String> categories, List<String> issueIds, List<String> providers, List<String> severities, boolean recursive) Deprecated.Counts issues for this element for the given filter parameters.- Parameters:
categories
- Issue categories (null or empty list means 'all')issueIds
- Issue Id's (null or empty list means 'all')providers
- Issue providers (null or empty list means 'all')severities
- Issue severities (null or empty list means 'all')recursive
- Include children- Returns:
- Number of issues matching the filter criteria
-
getIssueCount
int getIssueCount(List<String> categories, List<String> issueIds, List<String> providers, List<String> severities, boolean includingSecondary, boolean recursive) Counts issues for this element for the given filter parameters.- Parameters:
categories
- Issue categories (null or empty list means 'all')issueIds
- Issue Id's (null or empty list means 'all')providers
- Issue providers (null or empty list means 'all')severities
- Issue severities (null or empty list means 'all')includingSecondary
- Including secondary issues (cycle group issues, duplicate code block issues, architecture violations/deprecations)recursive
- Include children- Returns:
- Number of issues matching the filter criteria
-
getIssues
List<IIssueAccess> getIssues()Collect all issues for this element and it's children including secondary issues (cycle group issues, duplicate code block issues, architecture violations/deprecations).- Returns:
- The issues
-
getIssues
Collect issues- Parameters:
includingSecondary
- Include secondary issues (cycle group issues, duplicate code block issues, architecture violations/deprecations)recursive
- Collect children's issues- Returns:
- The issues
-
getIssues
List<IIssueAccess> getIssues(List<String> categories, List<String> issueIds, List<String> providers, List<String> severities, boolean includingSecondary, boolean recursive) Collect issues for the given filter parameters.- Parameters:
categories
- Issue categories (null or empty list means 'all')issueIds
- Issue Id's (null or empty list means 'all')providers
- Issue providers (null or empty list means 'all')severities
- Issue severities (null or empty list means 'all')includingSecondary
- Include secondary issues (cycle group issues, duplicate code block issues, architecture violations/deprecations)recursive
- Collect children's issues- Returns:
- The issues
-
getOutgoingDependenciesRecursively
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.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude all dependencies targeting this object or its childrenexcludeExternals
- 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
List<IAggregatedDependencyAccess> getOutgoingDependenciesRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, IDependencyKind... types) Compute the outgoing aggregated dependencies of this element and all its children, excluding excluded elements.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude all dependencies targeting this object or its childrenexcludeExternals
- 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
List<IAggregatedDependencyAccess> getOutgoingDependenciesRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types) Compute the outgoing aggregated dependencies of this element and all its children, including external elements, excluding excluded elements.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude all dependencies targeting this object or its childrentypes
- List of dependency types (if empty, all dependencies will be returned)- Returns:
- List of dependencies aggregated to the desired level
-
getIncomingDependenciesRecursively
List<IAggregatedDependencyAccess> getIncomingDependenciesRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExcluded, IDependencyKind... types) Compute the incoming aggregated dependencies of this element and all its children.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude all dependencies coming from this object or its childrenexcludeExcluded
- If true, exclude all dependencies coming from excluded elementstypes
- List of dependency types (if empty, all dependencies will be returned)- Returns:
- List of incoming dependencies aggregated to the desired level
-
getIncomingDependenciesRecursively
List<IAggregatedDependencyAccess> getIncomingDependenciesRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types) Compute the incoming aggregated dependencies of this element and all its children, excluding excluded elements.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude all dependencies coming from this object or its childrentypes
- List of dependency types (if empty, all dependencies will be returned)- Returns:
- List of incoming dependencies aggregated to the desired level
-
getReferencedElementsRecursively
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.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude this object and its children from the resulting listexcludeExternals
- 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
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.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude this object and its children from the resulting listexcludeExternals
- 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
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.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude this object and its children from the resulting listtypes
- List of dependency types (if empty, all dependencies will be returned)- Returns:
- List of referenced objects according to the aggregation level
-
getReferencingElementsRecursively
List<INamedElementAccess> getReferencingElementsRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExcluded, IDependencyKind... types) Get a list of all elements referencing this element and its children.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude this object and its children from the resulting listexcludeExcluded
- 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
List<INamedElementAccess> getReferencingElementsRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types) Get a list of all elements referencing this element and its children, excluding excluded elements.- Parameters:
aggr
- The desired level of aggregationexcludeSelf
- If true, exclude this object and its children from the resulting listtypes
- List of dependency types (if empty, all dependencies will be returned)- Returns:
- List of referencing objects according to the aggregation level.
-
accept
Visit this element.- Parameters:
visitor
- The visitor implementation
-
getFullyQualifiedName
String getFullyQualifiedName()- Returns:
- the fully qualified name as shown in the Sonargraph properties view
-
getParent
- 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.
-