Package de.monticore.tf.odrules
Class GenerateConditionsVisitor
java.lang.Object
de.monticore.tf.odrules.GenerateConditionsVisitor
- All Implemented Interfaces:
ODRulesVisitor2,de.monticore.visitor.IVisitor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected ASTODObjectprotected List<ASTObjectCondition> protected List<ASTODObject> protected Stringprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConditions(ASTObjectCondition... objectCondition) protected voidcreateConditions(ASTODAttribute node, ASTODObject object, Optional<ASTODObject> targetObject) protected voidcreateConditionsForBoolean(ASTODAttribute node, Optional<ASTODObject> targetObject) protected voidprotected voidprotected StringcreateGetterStatement(ASTODAttribute attrWithValue) protected StringcreateGetterStatementForCand(String statement) protected StringcreateIsStatement(String attrValue, boolean forCand) protected StringcreateObjectString(String statement) protected StringcreatePresentCheckStatement(String getter) protected StringcreateSourceObjectCondition(ASTODLink node, String rightObjectName, boolean isIterated, boolean isOptional) protected StringcreateTargetObjectCondition(ASTODLink node, String leftObjectName, boolean isIterated, boolean isOptional) voidendVisit(ASTODAttribute node) protected Optional<ASTODObject> getODObject(String objName) protected booleanisObjectWithoutStereoType(ASTODObject object) voidvisit(ASTODAttribute node) Visits the nodes of the given AST of the type ASTODAttribute and generates Strings for the conditionsvoidvisit(ASTODDefinition node) voidVisits the nodes of the given AST of the type ASTODLink and generates Strings for the conditionsvoidvisit(ASTODObject node) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.monticore.visitor.IVisitor
endVisit, endVisit, endVisit, endVisit, visit, visit, visit, visitMethods inherited from interface de.monticore.tf.odrules._visitor.ODRulesVisitor2
endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, endVisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
Field Details
-
objectConditions
-
objectName
-
attrValue
-
targetOptional
protected boolean targetOptional -
object
-
objectList
-
-
Constructor Details
-
GenerateConditionsVisitor
public GenerateConditionsVisitor()
-
-
Method Details
-
getObjectConditions
-
visit
- Specified by:
visitin interfaceODRulesVisitor2
-
visit
- Specified by:
visitin interfaceODRulesVisitor2
-
visit
Visits the nodes of the given AST of the type ASTODAttribute and generates Strings for the conditions- Specified by:
visitin interfaceODRulesVisitor2- Parameters:
node- the node to start visiting
-
endVisit
- Specified by:
endVisitin interfaceODRulesVisitor2
-
addConditions
-
createConditions
protected void createConditions(ASTODAttribute node, ASTODObject object, Optional<ASTODObject> targetObject) -
createConditionsForListWithoutTarget
-
createConditionsForBoolean
-
createConditionsForInt
-
visit
Visits the nodes of the given AST of the type ASTODLink and generates Strings for the conditions- Specified by:
visitin interfaceODRulesVisitor2- Parameters:
node- the node to start visiting
-
createSourceObjectCondition
-
createTargetObjectCondition
-
createGetterStatement
-
createPresentCheckStatement
-
createGetterStatementForCand
-
createIsStatement
-
createObjectString
-
getODObject
-
isObjectWithoutStereoType
-