Package com.hello2morrow.sonargraph.api
Interface IBaseCoreAccess
- All Superinterfaces:
IElementAccess
,INamedElementAccess
- All Known Subinterfaces:
IPluginCoreAccess
,IPluginLanguageBasedAccess
Parent interface for plugins extending the functionality of Sonargraph by accessing the parser model.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.hello2morrow.sonargraph.api.INamedElementAccess
INamedElementAccess.INamedElementAccessVisitor
-
Method Summary
Modifier and TypeMethodDescriptionfindAllMatchingElements
(INamedElementAccess searchRoot, Predicate<INamedElementAccess> predicate) Find all elements matching the predicate.findAllMatchingElementsRecursively
(INamedElementAccess searchRoot, Predicate<INamedElementAccess> predicate) Find all elements recursively, matching the predicate.findAllMatchingFields
(INamedElementAccess searchRoot, Predicate<IFieldAccess> predicate) Find all fields matching the predicate.findAllMatchingMethods
(INamedElementAccess searchRoot, Predicate<IMethodAccess> predicate) Find all methods matching the predicate.findAllMatchingRoutines
(INamedElementAccess searchRoot, Predicate<IRoutineAccess> predicate) Find all routines matching the predicate.findAllMatchingTypes
(INamedElementAccess searchRoot, Predicate<ITypeAccess> predicate) Find all types matching the predicate.findElementByFqn
(String fqn) Find an element by its fully qualified namefindFirstMatchingElement
(INamedElementAccess searchRoot, Predicate<INamedElementAccess> predicate) Find first element matching the predicate.findFirstMatchingElementRecursively
(INamedElementAccess searchRoot, Predicate<INamedElementAccess> predicate) Recursively find first element matching the predicate.findFirstMatchingField
(INamedElementAccess searchRoot, Predicate<IFieldAccess> predicate) Find first field matching the predicate.findFirstMatchingMethod
(INamedElementAccess searchRoot, Predicate<IMethodAccess> predicate) Find first method matching the predicate.findFirstMatchingRoutine
(INamedElementAccess searchRoot, Predicate<IRoutineAccess> predicate) Find first type routine the predicate.findFirstMatchingType
(INamedElementAccess searchRoot, Predicate<ITypeAccess> predicate) Find first type matching the predicate.Gets a list of all components of the software systemgetComponents
(boolean includeExternals) Gets a list of all components of the software systemgetExternalRoot
(String forLanguage) Get the external root node for a given languageGet a list of the modules in this systemgetName()
Return name of software systemvoid
visitLogicalModuleNamespaces
(ModelVisitor visitor) Visit module level logical namespacesvoid
visitLogicalSystemNamespaces
(ModelVisitor visitor) Visit system level logical namespacesvoid
visitParserModel
(ModelVisitor visitor) Visit only the parser modelMethods inherited from interface com.hello2morrow.sonargraph.api.IElementAccess
getNameWithSignature, getShortName, getShortNameWithSignature, ignoreIssues, isExcluded, isExternal
Methods inherited from interface com.hello2morrow.sonargraph.api.INamedElementAccess
accept, getChildren, getFullyQualifiedName, getIncomingDependenciesRecursively, getIncomingDependenciesRecursively, getIssueCount, getIssueCount, getIssueCount, getIssueCount, getIssueCount, getIssues, getIssues, getIssues, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getOutgoingDependenciesRecursively, getParent, getParent, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencedElementsRecursively, getReferencingElementsRecursively, getReferencingElementsRecursively
-
Method Details
-
getBaseDirectory
File getBaseDirectory() -
getBaseDirectoryPath
String getBaseDirectoryPath() -
getName
String getName()Return name of software system- Specified by:
getName
in interfaceIElementAccess
- Returns:
- Name of software system
-
getComponents
List<IComponentAccess> getComponents()Gets a list of all components of the software system- Returns:
- Component list
-
getComponents
Gets a list of all components of the software system- Parameters:
if
- false, only internal components will be returned- Returns:
- Component list
-
getModules
List<IModuleAccess> getModules()Get a list of the modules in this system- Returns:
- Module list
-
getExternalRoot
Get the external root node for a given language- Parameters:
forLanguage
- Language (as of now "Java", "C#" or "C,C++")- Returns:
- the external root for the given language or null if it does not exist.
-
findElementByFqn
Find an element by its fully qualified name- Parameters:
fqn
- The fully qualified name of the element (to be found in Sonargraph properties view). Must not be null, empty or contain only whitespace.- Returns:
- The element or null, if no element with that fully qualified name can be found.
-
findFirstMatchingType
Find first type matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the type.- Returns:
- The matching type or null if there is no matching type.
-
findAllMatchingTypes
List<ITypeAccess> findAllMatchingTypes(INamedElementAccess searchRoot, Predicate<ITypeAccess> predicate) Find all types matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the types.- Returns:
- A list of types matching the predicate (can be empty).
-
findFirstMatchingMethod
IMethodAccess findFirstMatchingMethod(INamedElementAccess searchRoot, Predicate<IMethodAccess> predicate) Find first method matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the method.- Returns:
- The matching type or null if there is no matching method.
-
findAllMatchingMethods
List<IMethodAccess> findAllMatchingMethods(INamedElementAccess searchRoot, Predicate<IMethodAccess> predicate) Find all methods matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the methods.- Returns:
- A list of methods matching the predicate (can be empty).
-
findFirstMatchingRoutine
IRoutineAccess findFirstMatchingRoutine(INamedElementAccess searchRoot, Predicate<IRoutineAccess> predicate) Find first type routine the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the routine.- Returns:
- The matching type or null if there is no matching routine.
-
findAllMatchingRoutines
List<IRoutineAccess> findAllMatchingRoutines(INamedElementAccess searchRoot, Predicate<IRoutineAccess> predicate) Find all routines matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the routines.- Returns:
- A list of routines matching the predicate (can be empty).
-
findFirstMatchingField
IFieldAccess findFirstMatchingField(INamedElementAccess searchRoot, Predicate<IFieldAccess> predicate) Find first field matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the field.- Returns:
- The matching field or null if there is no matching field.
-
findAllMatchingFields
List<IFieldAccess> findAllMatchingFields(INamedElementAccess searchRoot, Predicate<IFieldAccess> predicate) Find all fields matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the fields.- Returns:
- A list of fields matching the predicate (can be empty).
-
findFirstMatchingElement
INamedElementAccess findFirstMatchingElement(INamedElementAccess searchRoot, Predicate<INamedElementAccess> predicate) Find first element matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the element.- Returns:
- The matching element or null if there is no matching element.
-
findFirstMatchingElementRecursively
INamedElementAccess findFirstMatchingElementRecursively(INamedElementAccess searchRoot, Predicate<INamedElementAccess> predicate) Recursively find first element matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searched.predicate
- The predicate to match the element, must not be null.- Returns:
- The matching element or null if there is no matching element.
-
findAllMatchingElements
List<INamedElementAccess> findAllMatchingElements(INamedElementAccess searchRoot, Predicate<INamedElementAccess> predicate) Find all elements matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the element.- Returns:
- A list of elements matching the predicate (can be empty).
-
findAllMatchingElementsRecursively
List<INamedElementAccess> findAllMatchingElementsRecursively(INamedElementAccess searchRoot, Predicate<INamedElementAccess> predicate) Find all elements recursively, matching the predicate.- Parameters:
searchRoot
- Element from where to begin the search or null if whole system is to be searchedpredicate
- The predicate to match the element.- Returns:
- A list of elements matching the predicate (can be empty).
-
getWorkspaceRoot
INamedElementAccess getWorkspaceRoot() -
visitParserModel
Visit only the parser model- Parameters:
visitor
- the visitor
-
visitLogicalModuleNamespaces
Visit module level logical namespaces- Parameters:
visitor
- the visitor
-
visitLogicalSystemNamespaces
Visit system level logical namespaces- Parameters:
visitor
- the visitor
-