Class AbstractProjectVisitor

java.lang.Object
net.ssehub.easy.varModel.model.AbstractProjectVisitor
All Implemented Interfaces:
ICustomDatatypeVisitor, IModelVisitor
Direct Known Subclasses:
AbstractDeclarationFinder, AbstractFrozenElementsFinder, AnnotationAssignmentFinder, DatatypeFinder, DeletedElementsCollector, EvalBlockFinder, InitialStructureCollector, MandatoryDeclarationClassifier, ModelElementTypeFinder, NamespaceFinder, ProjectCopyVisitor, ProjectInterfaceFinder

public abstract class AbstractProjectVisitor extends Object implements IModelVisitor
Abstract super class for visiting projects. This visitor can be controlled to specify whether project imports shall be visited or not.
Author:
El-Sharkawy
  • Field Details

    • originProject

      private Project originProject
      The project where the visiting has been started.
    • filterType

      private FilterType filterType
      Specifies whether project imports shall be considered or not.
    • done

      private Set<Project> done
  • Constructor Details

    • AbstractProjectVisitor

      protected AbstractProjectVisitor(Project originProject, FilterType filterType)
      Sole constructor for this visitor. This constructor does not start the visiting process, the Project.accept(IModelVisitor) should be called inside the constructor of the inherited visitors.
      Parameters:
      originProject - The project where the visiting shall start
      filterType - Specifies whether project imports shall be considered or not.
  • Method Details

    • visitProjectImport

      public void visitProjectImport(ProjectImport pImport)
      Description copied from interface: IModelVisitor
      This method is used for visiting a ProjectImport.
      Specified by:
      visitProjectImport in interface IModelVisitor
      Parameters:
      pImport - One ProjectImport which should be visited.
    • visitProject

      public void visitProject(Project project)
      Description copied from interface: IModelVisitor
      Method for visiting a project.
      Specified by:
      visitProject in interface IModelVisitor
      Parameters:
      project - The project which should be visited.
    • getStartingProject

      protected Project getStartingProject()
      Returns the original project which was the starting point for visitation.
      Returns:
      The starting point of the visitation.
    • getFilterType

      protected FilterType getFilterType()
      Returns the FilterType, which is currently used.
      Returns:
      The starting point of the visitation.
    • clear

      protected void clear(Project originProject, FilterType filterType)
      Resets the knowledge if a this visitor should be used for a second iteration. Both parameters are only optional (if null the original value will be kept).
      Parameters:
      originProject - The starting project, should be the project from the constructor call.
      filterType - Specifies whether project imports shall be considered or not.