Class DatatypeFinder
java.lang.Object
net.ssehub.easy.varModel.model.AbstractProjectVisitor
net.ssehub.easy.varModel.model.filter.DatatypeFinder
- All Implemented Interfaces:
ICustomDatatypeVisitor,IModelVisitor
Visitor for finding
CustomDatatype of a specific type.- Author:
- El-Sharkawy, Sizonenko
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDatatypeFinder(Project originProject, FilterType filterType, IDatatype type) Sole constructor for creating a newDatatypeFinder. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of all found datatypes of the specifiedCustomDatatype.voidvisitAttribute(Attribute attribute) Method for visiting an attribute.voidvisitAttributeAssignment(AttributeAssignment assignment) Visits an attribute assignment.voidvisitComment(Comment comment) Method for visiting a comment.voidvisitCompound(Compound compound) Method for visiting a compound.voidVisits a compound access statement (may occur in freeze blocks.voidvisitConstraint(Constraint constraint) Method for visiting a constraint.voidThis method is used for visiting a decision variable declaration.voidvisitDerivedDatatype(DerivedDatatype datatype) Method for visiting a derived datatype.voidMethod for visiting an enum.voidvisitEnumLiteral(EnumLiteral literal) Method for visiting an enum literal.voidvisitFreezeBlock(FreezeBlock freeze) Method for visiting a freeze block.private voidvisitIDatatype(CustomDatatype typeDefinition) Checks whether the visited datatype definition is an instance of the specifiedtypeand adds the type definition to the list of found elements.voidMethod for visiting an operation definition.voidvisitOrderedEnum(OrderedEnum eenum) Method for visiting an ordered enum.voidMethod for visiting a partial evaluation block.voidMethod for visiting a project interface.voidvisitReference(Reference reference) Method for visiting a reference.voidvisitSequence(Sequence sequence) Method for visiting a sequence.voidMethod for visiting a set.Methods inherited from class net.ssehub.easy.varModel.model.AbstractProjectVisitor
clear, getFilterType, getStartingProject, visitProject, visitProjectImport
-
Field Details
-
foundDatatypes
-
type
-
-
Constructor Details
-
DatatypeFinder
Sole constructor for creating a newDatatypeFinder.- Parameters:
originProject- The project where the visiting shall startfilterType- Specifies whether project imports shall be considered or not.type- An optional parameter of which kind the found elements should be. This should be aCustomDatatype. If it is null allCustomDatatypewill be collected.
-
-
Method Details
-
getFoundDatatypes
Returns a list of all found datatypes of the specifiedCustomDatatype.- Returns:
- a list of found
CustomDatatypedefined inside the givenProject. This list maybe empty.
-
visitDecisionVariableDeclaration
Description copied from interface:IModelVisitorThis method is used for visiting a decision variable declaration.- Parameters:
decl- One declaration which should be visited.
-
visitAttribute
Description copied from interface:IModelVisitorMethod for visiting an attribute.- Parameters:
attribute- The attribute which should be visited.
-
visitConstraint
Description copied from interface:IModelVisitorMethod for visiting a constraint.- Parameters:
constraint- The constraint which should be visited.
-
visitFreezeBlock
Description copied from interface:IModelVisitorMethod for visiting a freeze block.- Parameters:
freeze- The freeze block which should be visited.
-
visitOperationDefinition
Description copied from interface:IModelVisitorMethod for visiting an operation definition.- Parameters:
opdef- The operation definition which should be visited.
-
visitPartialEvaluationBlock
Description copied from interface:IModelVisitorMethod for visiting a partial evaluation block.- Parameters:
block- The partial evaluation block which should be visited.
-
visitProjectInterface
Description copied from interface:IModelVisitorMethod for visiting a project interface.- Parameters:
iface- The interface which should be visited.
-
visitComment
Description copied from interface:IModelVisitorMethod for visiting a comment.- Parameters:
comment- the comment to visit
-
visitAttributeAssignment
Description copied from interface:IModelVisitorVisits an attribute assignment.- Parameters:
assignment- the assignment to visit
-
visitEnum
Description copied from interface:ICustomDatatypeVisitorMethod for visiting an enum.- Parameters:
eenum- The enum which should be visited.
-
visitOrderedEnum
Description copied from interface:ICustomDatatypeVisitorMethod for visiting an ordered enum.- Parameters:
eenum- The enum which should be visited.
-
visitCompound
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a compound.- Parameters:
compound- The compound which should be visited.
-
visitDerivedDatatype
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a derived datatype.- Parameters:
datatype- The datatype which should be visited.
-
visitEnumLiteral
Description copied from interface:ICustomDatatypeVisitorMethod for visiting an enum literal.- Parameters:
literal- The literal which should be visited.
-
visitReference
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a reference.- Parameters:
reference- The reference which should be visited.
-
visitSequence
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a sequence.- Parameters:
sequence- The sequence which should be visited.
-
visitSet
Description copied from interface:ICustomDatatypeVisitorMethod for visiting a set.- Parameters:
set- The set which should be visited.
-
visitIDatatype
Checks whether the visited datatype definition is an instance of the specifiedtypeand adds the type definition to the list of found elements.- Parameters:
typeDefinition- The visited datatype definition, which should be added to the list of found elements, if it is an instance oftype.
-
visitCompoundAccessStatement
Description copied from interface:IModelVisitorVisits a compound access statement (may occur in freeze blocks.- Parameters:
access- the access statement
-