public class CoreAccess extends AbstractCoreAccess
ElementAccess.IAccessFactory
INamedElementAccess.INamedElementAccessVisitor
Constructor and Description |
---|
CoreAccess(SoftwareSystem softwareSystem,
IMetricIdProvider metricIdProvider,
ScriptApi api,
IMetricAccessor accessor)
Internal constructor - do not use
|
Modifier and Type | Method and Description |
---|---|
SearchResult<FieldAccess> |
findFields(<any> predicate,
int limit)
Find fields matching the given predicate closure.
|
SearchResult<FieldAccess> |
findFields(ElementAccess<? extends NamedElement> searchRoot,
<any> predicate,
int limit)
Find fields matching the given predicate closure.
|
SearchResult<MethodAccess> |
findMethods(<any> predicate,
int limit)
Find methods matching the given predicate closure.
|
SearchResult<MethodAccess> |
findMethods(ElementAccess<? extends NamedElement> searchRoot,
<any> predicate,
int limit)
Find methods matching the given predicate closure
|
SearchResult<RoutineAccess> |
findRoutines(<any> predicate,
int limit)
Find routines matching the given predicate closure.
|
SearchResult<RoutineAccess> |
findRoutines(ElementAccess<? extends NamedElement> searchRoot,
<any> predicate,
int limit)
Find routines matching the given predicate closure
|
SearchResult<TypeAccess> |
findTypes(<any> predicate,
int limit)
Find types matching the given predicate closure.
|
SearchResult<TypeAccess> |
findTypes(ElementAccess<? extends NamedElement> searchRoot,
<any> predicate,
int limit)
Find types matching the given predicate closure
|
MetricIdAccess |
getOrCreateMetricId(java.lang.String id,
java.lang.String presentationName,
java.lang.String description,
boolean isFloat,
java.lang.Number lowerThreshold,
java.lang.Number upperThreshold,
MetricSorting sorting,
double minValue,
double maxValue,
java.lang.String... categoryIds)
Create or get a metric id for a metric with thresholds.
|
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)
Create or get a metric id for a metric with thresholds and best/worst values.
|
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)
Create or get a metric id for a metric with thresholds.
|
MetricIdAccess |
getOrCreateMetricId(java.lang.String id,
java.lang.String presentationName,
java.lang.String description,
boolean isFloat,
java.lang.String... categoryIds)
Create or get a metric id.
|
void |
visitModuleNamespaces(ICoreVisitor visitor)
Deprecated.
|
void |
visitSystemNamespaces(ICoreVisitor visitor)
Deprecated.
|
createVisitor, findElementByFqn, getACDMetric, getBaseDirectory, getBiggestComponentCycleGroupMetric, getBiggestModuleACDMetric, getCCDMetric, getCodeCommentLinesMetric, getCommentLinesMetric, getComponentCyclicityMetric, getComponentDependenciesToRemoveMetric, getComponentParserDependenciesToRemoveMetric, getComponentRelativeCyclicityMetric, getComponents, getComponentStructuralDebtIndexMetric, getLinesOfCodeMetric, getMaintainabilityLevelMetric, getNCCDMetric, getNumberOfAllViolatingComponentsMetric, getNumberOfArtifactsMetric, getNumberOfCodeDuplicatesMetric, getNumberOfComponentCycleGroupsMetric, getNumberOfComponentsMetric, getNumberOfComponentViolationsMetric, getNumberOfComponntsInDeprectaedArtifactsMetric, getNumberOfCyclicComponentsMetric, getNumberOfCyclicModulesMetric, getNumberOfDuplicatedLinesMetric, getNumberOfEmptyArtifactsMetric, getNumberOfIgnoredCodeDuplicatesMetric, getNumberOfIgnoredCyclicComponentsMetric, getNumberOfIgnoredParserDependencyViolationsMetric, getNumberOfModulesMetric, getNumberOfParserDependencyViolationsMetric, getNumberOfStatementsMetric, getNumberOfUnassignedComponentsMetric, getNumberOfViolatingComponentsMetric, getPropagationCostMetric, getRACDMetric, getSourceElementCountMetric, getTotalLinesMetric, visitLogicalModuleNamespaces, visitLogicalSystemNamespaces, visitModel, visitParserModel
accept, equals, getChildren, getElement, getIncomingDependenciesRecursively, getIncomingDependenciesRecursively, getName, getNameWithSignature, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getParent, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencingElementsRecursively, getReferencingElementsRecursively, getShortName, getShortNameWithSignature, hashCode, ignoreIssues, isExcluded, isExternal, toString
public CoreAccess(SoftwareSystem softwareSystem, IMetricIdProvider metricIdProvider, ScriptApi api, IMetricAccessor accessor)
softwareSystem
- the systemmetricIdProvider
- the metric id providerapi
- accesspublic final MetricIdAccess getOrCreateMetricId(java.lang.String id, java.lang.String presentationName, java.lang.String description, boolean isFloat, java.lang.String... categoryIds)
id
- Unique IdpresentationName
- Presentation name of metricdescription
- A short descriptionisFloat
- true, if metric has float values, false for integer valuescategoryIds
- Optional metric category id's. Category id "Script" is automatically added.public final 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)
id
- Unique IdpresentationName
- Presentation name of metricdescription
- A short descriptionisFloat
- true, if metric has float values, false for integer valueslowerThreshold
- The lower threshold for this metricupperThreshold
- The upper threshold for this metriccategoryIds
- Optional metric category id's. Category id "Script" is automatically added.public MetricIdAccess getOrCreateMetricId(java.lang.String id, java.lang.String presentationName, java.lang.String description, boolean isFloat, java.lang.Number lowerThreshold, java.lang.Number upperThreshold, MetricSorting sorting, double minValue, double maxValue, java.lang.String... categoryIds)
id
- Unique IdpresentationName
- Presentation name of metricdescription
- A short descriptionisFloat
- true, if metric has float values, false for integer valueslowerThreshold
- The lower threshold for this metricupperThreshold
- The upper threshold for this metricsorting
- Metric sortingminValue
- Minimum valuemaxValue
- Maximum valuecategoryIds
- Optional metric category id's. Category id "Script" is automatically added.public final 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)
id
- Unique IdpresentationName
- Presentation name of metricdescription
- A short descriptionisFloat
- true, if metric has float values, false for integer valueslowerThreshold
- The lower threshold for this metric, if null upperThreshold must be null as wellupperThreshold
- The upper threshold for this metric, if null lowerThreshold must be null as wellbestValue
- The best value of this metric: Use either specific values or constants like Double.POSITIVE_INFINITY
for an unbound
upper value, or null
if there is no best value.worstValue
- The worst value of this metric. Use either specific values or constants like Double.POSITIVE_INFINITY
for an unbound
upper value, or null
if there is no worst value.categoryIds
- Optional metric category ids. Category id "Script" is automatically added.@Deprecated public final void visitSystemNamespaces(ICoreVisitor visitor)
AbstractCoreAccess.visitLogicalSystemNamespaces(ICoreVisitor)
instead.visitor
- the visitor@Deprecated public final void visitModuleNamespaces(ICoreVisitor visitor)
AbstractCoreAccess.visitLogicalModuleNamespaces(ICoreVisitor)
instead.visitor
- the visitorpublic SearchResult<MethodAccess> findMethods(<any> predicate, int limit)
predicate
- A closure returning Boolean. Must not be null.limit
- If 0 or negative return all matches. Otherwise return a maximum of 'limit' matches.public SearchResult<MethodAccess> findMethods(ElementAccess<? extends NamedElement> searchRoot, <any> predicate, int limit)
searchRoot
- Only search under this element. Must not be null.predicate
- A closure returning Boolean. Must not be null.limit
- If 0 or negative return all matches. Otherwise return a maximum of 'limit' matches.public SearchResult<RoutineAccess> findRoutines(<any> predicate, int limit)
predicate
- A closure returning Boolean. Must not be null.limit
- If 0 or negative return all matches. Otherwise return a maximum of 'limit' matches.public SearchResult<RoutineAccess> findRoutines(ElementAccess<? extends NamedElement> searchRoot, <any> predicate, int limit)
searchRoot
- Only search under this element. Must not be null.predicate
- A closure returning Boolean. Must not be null.limit
- If 0 or negative return all matches. Otherwise return a maximum of 'limit' matches.public SearchResult<FieldAccess> findFields(<any> predicate, int limit)
predicate
- A closure returning Boolean. Must not be null.limit
- If 0 or negative return all matches. Otherwise return a maximum of 'limit' matches.public SearchResult<FieldAccess> findFields(ElementAccess<? extends NamedElement> searchRoot, <any> predicate, int limit)
searchRoot
- Only search under this element. Must not be null.predicate
- A closure returning Boolean. Must not be null.limit
- If 0 or negative return all matches. Otherwise return a maximum of 'limit' matches.public SearchResult<TypeAccess> findTypes(<any> predicate, int limit)
predicate
- A closure returning Boolean. Must not be null.limit
- If 0 or negative return all matches. Otherwise return a maximum of 'limit' matches.public SearchResult<TypeAccess> findTypes(ElementAccess<? extends NamedElement> searchRoot, <any> predicate, int limit)
searchRoot
- Only search under this element. Must not be null.predicate
- A closure returning Boolean. Must not be null.limit
- If 0 or negative return all matches. Otherwise return a maximum of 'limit' matches.