Package net.ssehub.easy.varModel.model
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 java.lang.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 Summary
Fields Modifier and Type Field Description private java.util.Set<Project>doneprivate FilterTypefilterTypeSpecifies whether project imports shall be considered or not.private ProjectoriginProjectThe project where the visiting has been started.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractProjectVisitor(Project originProject, FilterType filterType)Sole constructor for this visitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclear(Project originProject, FilterType filterType)Resets the knowledge if a this visitor should be used for a second iteration.protected FilterTypegetFilterType()Returns theFilterType, which is currently used.protected ProjectgetStartingProject()Returns the original project which was the starting point for visitation.voidvisitProject(Project project)Method for visiting a project.voidvisitProjectImport(ProjectImport pImport)This method is used for visiting a ProjectImport.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.varModel.model.datatypes.ICustomDatatypeVisitor
visitCompound, visitDerivedDatatype, visitEnum, visitEnumLiteral, visitOrderedEnum, visitReference, visitSequence, visitSet
-
Methods inherited from interface net.ssehub.easy.varModel.model.IModelVisitor
visitAttribute, visitAttributeAssignment, visitComment, visitCompoundAccessStatement, visitConstraint, visitDecisionVariableDeclaration, visitFreezeBlock, visitOperationDefinition, visitPartialEvaluationBlock, visitProjectInterface
-
-
-
-
Field Detail
-
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 java.util.Set<Project> done
-
-
Constructor Detail
-
AbstractProjectVisitor
protected AbstractProjectVisitor(Project originProject, FilterType filterType)
Sole constructor for this visitor. This constructor does not start the visiting process, theProject.accept(IModelVisitor)should be called inside the constructor of the inherited visitors.- Parameters:
originProject- The project where the visiting shall startfilterType- Specifies whether project imports shall be considered or not.
-
-
Method Detail
-
visitProjectImport
public void visitProjectImport(ProjectImport pImport)
Description copied from interface:IModelVisitorThis method is used for visiting a ProjectImport.- Specified by:
visitProjectImportin interfaceIModelVisitor- Parameters:
pImport- One ProjectImport which should be visited.
-
visitProject
public void visitProject(Project project)
Description copied from interface:IModelVisitorMethod for visiting a project.- Specified by:
visitProjectin interfaceIModelVisitor- 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 theFilterType, 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.
-
-