Interface IBaseCoreAccess

    • Method Detail

      • getBaseDirectory

        java.io.File getBaseDirectory()
      • getBaseDirectoryPath

        java.lang.String getBaseDirectoryPath()
      • getName

        java.lang.String getName()
        Return name of software system
        Specified by:
        getName in interface IElementAccess
        Returns:
        Name of software system
      • getComponents

        java.util.List<IComponentAccess> getComponents()
        Gets a list of all components of the software system
        Returns:
        Component list
      • getComponents

        java.util.List<IComponentAccess> getComponents​(boolean includeExternals)
        Gets a list of all components of the software system
        Parameters:
        if - false, only internal components will be returned
        Returns:
        Component list
      • getModules

        java.util.List<IModuleAccess> getModules()
        Get a list of the modules in this system
        Returns:
        Module list
      • getExternalRoot

        IExternalAccess getExternalRoot​(java.lang.String forLanguage)
        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

        IElementAccess findElementByFqn​(java.lang.String fqn)
        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

        ITypeAccess findFirstMatchingType​(INamedElementAccess searchRoot,
                                          java.util.function.Predicate<ITypeAccess> predicate)
        Find first type 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 type.
        Returns:
        The matching type or null if there is no matching type.
      • findAllMatchingTypes

        java.util.List<ITypeAccess> findAllMatchingTypes​(INamedElementAccess searchRoot,
                                                         java.util.function.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 searched
        predicate - The predicate to match the types.
        Returns:
        A list of types matching the predicate (can be empty).
      • findFirstMatchingMethod

        IMethodAccess findFirstMatchingMethod​(INamedElementAccess searchRoot,
                                              java.util.function.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 searched
        predicate - The predicate to match the method.
        Returns:
        The matching type or null if there is no matching method.
      • findAllMatchingMethods

        java.util.List<IMethodAccess> findAllMatchingMethods​(INamedElementAccess searchRoot,
                                                             java.util.function.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 searched
        predicate - The predicate to match the methods.
        Returns:
        A list of methods matching the predicate (can be empty).
      • findFirstMatchingRoutine

        IRoutineAccess findFirstMatchingRoutine​(INamedElementAccess searchRoot,
                                                java.util.function.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 searched
        predicate - The predicate to match the routine.
        Returns:
        The matching type or null if there is no matching routine.
      • findAllMatchingRoutines

        java.util.List<IRoutineAccess> findAllMatchingRoutines​(INamedElementAccess searchRoot,
                                                               java.util.function.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 searched
        predicate - The predicate to match the routines.
        Returns:
        A list of routines matching the predicate (can be empty).
      • findFirstMatchingField

        IFieldAccess findFirstMatchingField​(INamedElementAccess searchRoot,
                                            java.util.function.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 searched
        predicate - The predicate to match the field.
        Returns:
        The matching field or null if there is no matching field.
      • findAllMatchingFields

        java.util.List<IFieldAccess> findAllMatchingFields​(INamedElementAccess searchRoot,
                                                           java.util.function.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 searched
        predicate - The predicate to match the fields.
        Returns:
        A list of fields matching the predicate (can be empty).
      • findFirstMatchingElement

        INamedElementAccess findFirstMatchingElement​(INamedElementAccess searchRoot,
                                                     java.util.function.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 searched
        predicate - The predicate to match the element.
        Returns:
        The matching element or null if there is no matching element.
      • findFirstMatchingElementRecursively

        INamedElementAccess findFirstMatchingElementRecursively​(INamedElementAccess searchRoot,
                                                                java.util.function.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

        java.util.List<INamedElementAccess> findAllMatchingElements​(INamedElementAccess searchRoot,
                                                                    java.util.function.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 searched
        predicate - The predicate to match the element.
        Returns:
        A list of elements matching the predicate (can be empty).
      • findAllMatchingElementsRecursively

        java.util.List<INamedElementAccess> findAllMatchingElementsRecursively​(INamedElementAccess searchRoot,
                                                                               java.util.function.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 searched
        predicate - The predicate to match the element.
        Returns:
        A list of elements matching the predicate (can be empty).
      • visitParserModel

        void visitParserModel​(ModelVisitor visitor)
        Visit only the parser model
        Parameters:
        visitor - the visitor
      • visitLogicalModuleNamespaces

        void visitLogicalModuleNamespaces​(ModelVisitor visitor)
        Visit module level logical namespaces
        Parameters:
        visitor - the visitor
      • visitLogicalSystemNamespaces

        void visitLogicalSystemNamespaces​(ModelVisitor visitor)
        Visit system level logical namespaces
        Parameters:
        visitor - the visitor