Class LogicalNamespaceAccess
- java.lang.Object
-
- com.hello2morrow.sonargraph.core.api.model.ElementAccess<com.hello2morrow.sonargraph.core.model.programming.LogicalNamespace>
-
- com.hello2morrow.sonargraph.core.api.model.LogicalNamespaceAccess
-
- All Implemented Interfaces:
IElementAccess
,ILogicalNamespaceAccess
,INamedElementAccess
- Direct Known Subclasses:
CppLogicalNamespaceAccess
,CSharpLogicalNamespaceAccess
,JavaLogicalPackageAccess
public class LogicalNamespaceAccess extends ElementAccess<com.hello2morrow.sonargraph.core.model.programming.LogicalNamespace> implements ILogicalNamespaceAccess
Access object for logical namespaces.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.hello2morrow.sonargraph.core.api.model.ElementAccess
ElementAccess.IAccessFactory
-
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.model.ILogicalNamespaceAccess
ILogicalNamespaceAccess.IVisitor
-
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.model.INamedElementAccess
INamedElementAccess.INamedElementAccessVisitor
-
-
Constructor Summary
Constructors Constructor Description LogicalNamespaceAccess(com.hello2morrow.sonargraph.core.model.programming.LogicalNamespace element)
Internal use only
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(INamedElementAccess.INamedElementAccessVisitor visitor)
Internaljava.lang.Float
getAbstractnessMetric()
java.lang.Float
getAverageComplexityMetric()
java.lang.Float
getDistanceMetric()
java.util.List<IAggregatedDependencyAccess>
getIncomingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExcluded, IDependencyKind... types)
Compute the incoming aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e.java.util.List<IAggregatedDependencyAccess>
getIncomingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types)
Compute the incoming aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e.java.lang.Float
getInstabilityMetric()
java.lang.Object
getMetricLevel()
Internal use onlyIModuleAccess
getModuleScope()
Get the associated module from the parser model.java.lang.Integer
getNumberOfIncomingDependenciesMetric()
java.lang.Integer
getNumberOfOutgoingDependenciesMetric()
java.lang.Integer
getNumberOfTypesMetric()
java.util.List<IAggregatedDependencyAccess>
getOutgoingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, boolean excludeExcluded, IDependencyKind... types)
Compute the outgoing aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e.java.util.List<IAggregatedDependencyAccess>
getOutgoingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, IDependencyKind... types)
Compute the outgoing aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e.java.util.List<IAggregatedDependencyAccess>
getOutgoingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types)
Compute the outgoing aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e.java.util.List<IProgrammingElementAccess>
getProgrammingElements()
Return the list of programming elements in this namespace.java.util.List<INamedElementAccess>
getReferencedElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, boolean excludeExcluded, IDependencyKind... types)
Compute the list of referenced elements of this element and all its children, but treats this namespace as "flat", i.e.java.util.List<INamedElementAccess>
getReferencedElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, IDependencyKind... types)
Compute the list of referenced elements of this element and all its children, but treats this namespace as "flat", i.e.java.util.List<INamedElementAccess>
getReferencedElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types)
Compute the list of referenced elements of this element and all its children, but treats this namespace as "flat", i.e.java.util.List<INamedElementAccess>
getReferencingElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExcluded, IDependencyKind... types)
Get a list of all elements referencing this element and its children, but treats this namespace as "flat", i.e.java.util.List<INamedElementAccess>
getReferencingElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types)
Get a list of all elements referencing this element and its children, but treats this namespace as "flat", i.e.boolean
isPart()
Returns true, if this is a logical namespace without types, only acting as a parent for nested namespaces.boolean
isSystemScope()
Returns true, if this is a system scope logical namespace.-
Methods inherited from class com.hello2morrow.sonargraph.core.api.model.ElementAccess
equals, getChildren, getElement, getFullyQualifiedName, getIncomingDependenciesRecursively, getIncomingDependenciesRecursively, getIssueCount, getName, getNameWithSignature, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getParent, getParent, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencingElementsRecursively, getReferencingElementsRecursively, getShortName, getShortNameWithSignature, hashCode, ignoreIssues, isExcluded, isExternal, setFactory, toString
-
Methods inherited from interface com.hello2morrow.sonargraph.api.model.IElementAccess
getName, getNameWithSignature, getShortName, getShortNameWithSignature, ignoreIssues, isExcluded, isExternal
-
Methods inherited from interface com.hello2morrow.sonargraph.api.model.INamedElementAccess
getChildren, getFullyQualifiedName, getIncomingDependenciesRecursively, getIncomingDependenciesRecursively, getIssueCount, getIssueCount, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getParent, getParent, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencingElementsRecursively, getReferencingElementsRecursively
-
-
-
-
Method Detail
-
getModuleScope
public final IModuleAccess getModuleScope()
Get the associated module from the parser model.- Specified by:
getModuleScope
in interfaceILogicalNamespaceAccess
- Returns:
- see above
-
getMetricLevel
public java.lang.Object getMetricLevel()
Description copied from class:ElementAccess
Internal use only- Overrides:
getMetricLevel
in classElementAccess<com.hello2morrow.sonargraph.core.model.programming.LogicalNamespace>
-
isSystemScope
public final boolean isSystemScope()
Returns true, if this is a system scope logical namespace.- Specified by:
isSystemScope
in interfaceILogicalNamespaceAccess
- Returns:
- see above
-
isPart
public final boolean isPart()
Returns true, if this is a logical namespace without types, only acting as a parent for nested namespaces.- Specified by:
isPart
in interfaceILogicalNamespaceAccess
- Returns:
- see above
-
getProgrammingElements
public final java.util.List<IProgrammingElementAccess> getProgrammingElements()
Return the list of programming elements in this namespace.- Specified by:
getProgrammingElements
in interfaceILogicalNamespaceAccess
- Returns:
- see above
-
getAverageComplexityMetric
public final java.lang.Float getAverageComplexityMetric()
- Specified by:
getAverageComplexityMetric
in interfaceILogicalNamespaceAccess
- Returns:
- the corresponding metric or 'null' if not available
-
getAbstractnessMetric
public final java.lang.Float getAbstractnessMetric()
- Specified by:
getAbstractnessMetric
in interfaceILogicalNamespaceAccess
- Returns:
- the corresponding metric or 'null' if not available
-
getNumberOfTypesMetric
public final java.lang.Integer getNumberOfTypesMetric()
- Specified by:
getNumberOfTypesMetric
in interfaceILogicalNamespaceAccess
- Returns:
- the corresponding metric or 'null' if not available
-
getDistanceMetric
public final java.lang.Float getDistanceMetric()
- Specified by:
getDistanceMetric
in interfaceILogicalNamespaceAccess
- Returns:
- the corresponding metric or 'null' if not available
-
getInstabilityMetric
public final java.lang.Float getInstabilityMetric()
- Specified by:
getInstabilityMetric
in interfaceILogicalNamespaceAccess
- Returns:
- the corresponding metric or 'null' if not available
-
getNumberOfIncomingDependenciesMetric
public final java.lang.Integer getNumberOfIncomingDependenciesMetric()
- Specified by:
getNumberOfIncomingDependenciesMetric
in interfaceILogicalNamespaceAccess
- Returns:
- the corresponding metric or 'null' if not available
-
getNumberOfOutgoingDependenciesMetric
public final java.lang.Integer getNumberOfOutgoingDependenciesMetric()
- Specified by:
getNumberOfOutgoingDependenciesMetric
in interfaceILogicalNamespaceAccess
- Returns:
- the corresponding metric or 'null' if not available
-
accept
public void accept(INamedElementAccess.INamedElementAccessVisitor visitor)
Internal- Specified by:
accept
in interfaceINamedElementAccess
- Overrides:
accept
in classElementAccess<com.hello2morrow.sonargraph.core.model.programming.LogicalNamespace>
- Parameters:
visitor
- The visitor implementation
-
getOutgoingDependenciesFlatRecursively
public java.util.List<IAggregatedDependencyAccess> getOutgoingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, boolean excludeExcluded, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Compute the outgoing aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getOutgoingDependenciesFlatRecursively
in interfaceILogicalNamespaceAccess
- 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
-
getOutgoingDependenciesFlatRecursively
public java.util.List<IAggregatedDependencyAccess> getOutgoingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Compute the outgoing aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getOutgoingDependenciesFlatRecursively
in interfaceILogicalNamespaceAccess
- 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
-
getOutgoingDependenciesFlatRecursively
public java.util.List<IAggregatedDependencyAccess> getOutgoingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Compute the outgoing aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getOutgoingDependenciesFlatRecursively
in interfaceILogicalNamespaceAccess
- 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
-
getIncomingDependenciesFlatRecursively
public java.util.List<IAggregatedDependencyAccess> getIncomingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExcluded, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Compute the incoming aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getIncomingDependenciesFlatRecursively
in interfaceILogicalNamespaceAccess
- 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
-
getIncomingDependenciesFlatRecursively
public java.util.List<IAggregatedDependencyAccess> getIncomingDependenciesFlatRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Compute the incoming aggregated dependencies of this element and all its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getIncomingDependenciesFlatRecursively
in interfaceILogicalNamespaceAccess
- 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
-
getReferencingElementsFlatRecursively
public java.util.List<INamedElementAccess> getReferencingElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExcluded, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Get a list of all elements referencing this element and its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getReferencingElementsFlatRecursively
in interfaceILogicalNamespaceAccess
- 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.
-
getReferencingElementsFlatRecursively
public java.util.List<INamedElementAccess> getReferencingElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Get a list of all elements referencing this element and its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getReferencingElementsFlatRecursively
in interfaceILogicalNamespaceAccess
- 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.
-
getReferencedElementsFlatRecursively
public java.util.List<INamedElementAccess> getReferencedElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, boolean excludeExcluded, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Compute the list of referenced elements of this element and all its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getReferencedElementsFlatRecursively
in interfaceILogicalNamespaceAccess
- 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
-
getReferencedElementsFlatRecursively
public java.util.List<INamedElementAccess> getReferencedElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, boolean excludeExternals, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Compute the list of referenced elements of this element and all its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getReferencedElementsFlatRecursively
in interfaceILogicalNamespaceAccess
- 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
-
getReferencedElementsFlatRecursively
public java.util.List<INamedElementAccess> getReferencedElementsFlatRecursively(Aggregator aggr, boolean excludeSelf, IDependencyKind... types)
Description copied from interface:ILogicalNamespaceAccess
Compute the list of referenced elements of this element and all its children, but treats this namespace as "flat", i.e. does not include any child namespaces.- Specified by:
getReferencedElementsFlatRecursively
in interfaceILogicalNamespaceAccess
- 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
-
-