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 voidaccept(INamedElementAccess.INamedElementAccessVisitor visitor)Internaljava.lang.FloatgetAbstractnessMetric()java.lang.FloatgetAverageComplexityMetric()java.lang.FloatgetDistanceMetric()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.FloatgetInstabilityMetric()java.lang.ObjectgetMetricLevel()Internal use onlyIModuleAccessgetModuleScope()Get the associated module from the parser model.java.lang.IntegergetNumberOfIncomingDependenciesMetric()java.lang.IntegergetNumberOfOutgoingDependenciesMetric()java.lang.IntegergetNumberOfTypesMetric()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.booleanisPart()Returns true, if this is a logical namespace without types, only acting as a parent for nested namespaces.booleanisSystemScope()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:
getModuleScopein interfaceILogicalNamespaceAccess- Returns:
- see above
-
getMetricLevel
public java.lang.Object getMetricLevel()
Description copied from class:ElementAccessInternal use only- Overrides:
getMetricLevelin 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:
isSystemScopein 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:
isPartin interfaceILogicalNamespaceAccess- Returns:
- see above
-
getProgrammingElements
public final java.util.List<IProgrammingElementAccess> getProgrammingElements()
Return the list of programming elements in this namespace.- Specified by:
getProgrammingElementsin interfaceILogicalNamespaceAccess- Returns:
- see above
-
getAverageComplexityMetric
public final java.lang.Float getAverageComplexityMetric()
- Specified by:
getAverageComplexityMetricin interfaceILogicalNamespaceAccess- Returns:
- the corresponding metric or 'null' if not available
-
getAbstractnessMetric
public final java.lang.Float getAbstractnessMetric()
- Specified by:
getAbstractnessMetricin interfaceILogicalNamespaceAccess- Returns:
- the corresponding metric or 'null' if not available
-
getNumberOfTypesMetric
public final java.lang.Integer getNumberOfTypesMetric()
- Specified by:
getNumberOfTypesMetricin interfaceILogicalNamespaceAccess- Returns:
- the corresponding metric or 'null' if not available
-
getDistanceMetric
public final java.lang.Float getDistanceMetric()
- Specified by:
getDistanceMetricin interfaceILogicalNamespaceAccess- Returns:
- the corresponding metric or 'null' if not available
-
getInstabilityMetric
public final java.lang.Float getInstabilityMetric()
- Specified by:
getInstabilityMetricin interfaceILogicalNamespaceAccess- Returns:
- the corresponding metric or 'null' if not available
-
getNumberOfIncomingDependenciesMetric
public final java.lang.Integer getNumberOfIncomingDependenciesMetric()
- Specified by:
getNumberOfIncomingDependenciesMetricin interfaceILogicalNamespaceAccess- Returns:
- the corresponding metric or 'null' if not available
-
getNumberOfOutgoingDependenciesMetric
public final java.lang.Integer getNumberOfOutgoingDependenciesMetric()
- Specified by:
getNumberOfOutgoingDependenciesMetricin interfaceILogicalNamespaceAccess- Returns:
- the corresponding metric or 'null' if not available
-
accept
public void accept(INamedElementAccess.INamedElementAccessVisitor visitor)
Internal- Specified by:
acceptin interfaceINamedElementAccess- Overrides:
acceptin 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:ILogicalNamespaceAccessCompute 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:
getOutgoingDependenciesFlatRecursivelyin 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:ILogicalNamespaceAccessCompute 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:
getOutgoingDependenciesFlatRecursivelyin 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:ILogicalNamespaceAccessCompute 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:
getOutgoingDependenciesFlatRecursivelyin 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:ILogicalNamespaceAccessCompute 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:
getIncomingDependenciesFlatRecursivelyin 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:ILogicalNamespaceAccessCompute 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:
getIncomingDependenciesFlatRecursivelyin 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:ILogicalNamespaceAccessGet 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:
getReferencingElementsFlatRecursivelyin 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:ILogicalNamespaceAccessGet 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:
getReferencingElementsFlatRecursivelyin 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:ILogicalNamespaceAccessCompute 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:
getReferencedElementsFlatRecursivelyin 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:ILogicalNamespaceAccessCompute 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:
getReferencedElementsFlatRecursivelyin 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:ILogicalNamespaceAccessCompute 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:
getReferencedElementsFlatRecursivelyin 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
-
-