Package net.ssehub.easy.varModel.cst
Class ContainsSelfVisitor
java.lang.Object
net.ssehub.easy.varModel.cst.AbstractConstraintTreeVisitor
net.ssehub.easy.varModel.cst.ContainsSelfVisitor
- All Implemented Interfaces:
IConstraintTreeVisitor
Searches a constraint for the occurrence of
self.- Author:
- Holger Eichelberger
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the visitor for reuse.booleanReturns after accept whether the accepted constraint tree contains aself.booleanReturns after accept whether the accepted constraint tree contains aself.voidVisits self.Methods inherited from class net.ssehub.easy.varModel.cst.AbstractConstraintTreeVisitor
visitAnnotationVariable, visitBlockExpression, visitComment, visitCompoundAccess, visitCompoundInitializer, visitConstantValue, visitContainerInitializer, visitContainerOperationCall, visitDeferInitExpression, visitIfThen, visitLet, visitMultiAndExpression, visitOclFeatureCall, visitParenthesis, visitUnresolvedExpression, visitVariable
-
Field Details
-
containsSelf
private boolean containsSelf
-
-
Constructor Details
-
ContainsSelfVisitor
public ContainsSelfVisitor()Creates the visitor instance.
-
-
Method Details
-
containsSelf
public boolean containsSelf()Returns after accept whether the accepted constraint tree contains aself.- Returns:
truefor at least one self,falseelse
-
clear
public void clear()Clears the visitor for reuse. -
containsSelfAndClear
public boolean containsSelfAndClear()Returns after accept whether the accepted constraint tree contains aself. Clears the visitor.- Returns:
truefor at least one self,falseelse
-
visitSelf
Description copied from interface:IConstraintTreeVisitorVisits self.- Specified by:
visitSelfin interfaceIConstraintTreeVisitor- Overrides:
visitSelfin classAbstractConstraintTreeVisitor- Parameters:
self- the self object to visit
-