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
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
FieldsModifier and TypeFieldDescriptionprivate FilterTypeSpecifies whether project imports shall be considered or not.private ProjectThe project where the visiting has been started. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractProjectVisitor(Project originProject, FilterType filterType) Sole constructor for this visitor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidclear(Project originProject, FilterType filterType) Resets the knowledge if a this visitor should be used for a second iteration.protected FilterTypeReturns theFilterType, which is currently used.protected ProjectReturns 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, waitMethods inherited from interface net.ssehub.easy.varModel.model.datatypes.ICustomDatatypeVisitor
visitCompound, visitDerivedDatatype, visitEnum, visitEnumLiteral, visitOrderedEnum, visitReference, visitSequence, visitSetMethods inherited from interface net.ssehub.easy.varModel.model.IModelVisitor
visitAttribute, visitAttributeAssignment, visitComment, visitCompoundAccessStatement, visitConstraint, visitDecisionVariableDeclaration, visitFreezeBlock, visitOperationDefinition, visitPartialEvaluationBlock, visitProjectInterface
-
Field Details
-
originProject
The project where the visiting has been started. -
filterType
Specifies whether project imports shall be considered or not. -
done
-
-
Constructor Details
-
AbstractProjectVisitor
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 Details
-
visitProjectImport
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
Description copied from interface:IModelVisitorMethod for visiting a project.- Specified by:
visitProjectin interfaceIModelVisitor- Parameters:
project- The project which should be visited.
-
getStartingProject
Returns the original project which was the starting point for visitation.- Returns:
- The starting point of the visitation.
-
getFilterType
Returns theFilterType, which is currently used.- Returns:
- The starting point of the visitation.
-
clear
Resets the knowledge if a this visitor should be used for a second iteration. Both parameters are only optional (ifnullthe 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.
-