Class GenerateConditionsVisitor

java.lang.Object
de.monticore.tf.odrules.GenerateConditionsVisitor
All Implemented Interfaces:
ODRulesVisitor2, de.monticore.visitor.IVisitor

public class GenerateConditionsVisitor extends Object implements ODRulesVisitor2
  • Field Details

  • Constructor Details

    • GenerateConditionsVisitor

      public GenerateConditionsVisitor()
  • Method Details

    • getObjectConditions

      public List<ASTObjectCondition> getObjectConditions()
    • visit

      public void visit(ASTODObject node)
      Specified by:
      visit in interface ODRulesVisitor2
    • visit

      public void visit(ASTODDefinition node)
      Specified by:
      visit in interface ODRulesVisitor2
    • visit

      public void visit(ASTODAttribute node)
      Visits the nodes of the given AST of the type ASTODAttribute and generates Strings for the conditions
      Specified by:
      visit in interface ODRulesVisitor2
      Parameters:
      node - the node to start visiting
    • endVisit

      public void endVisit(ASTODAttribute node)
      Specified by:
      endVisit in interface ODRulesVisitor2
    • addConditions

      protected void addConditions(ASTObjectCondition... objectCondition)
    • createConditions

      protected void createConditions(ASTODAttribute node, ASTODObject object, Optional<ASTODObject> targetObject)
    • createConditionsForListWithoutTarget

      protected void createConditionsForListWithoutTarget(ASTODAttribute node)
    • createConditionsForBoolean

      protected void createConditionsForBoolean(ASTODAttribute node, Optional<ASTODObject> targetObject)
    • createConditionsForInt

      protected void createConditionsForInt(ASTODAttribute node)
    • visit

      public void visit(ASTODLink node)
      Visits the nodes of the given AST of the type ASTODLink and generates Strings for the conditions
      Specified by:
      visit in interface ODRulesVisitor2
      Parameters:
      node - the node to start visiting
    • createSourceObjectCondition

      protected String createSourceObjectCondition(ASTODLink node, String rightObjectName, boolean isIterated, boolean isOptional)
    • createTargetObjectCondition

      protected String createTargetObjectCondition(ASTODLink node, String leftObjectName, boolean isIterated, boolean isOptional)
    • createGetterStatement

      protected String createGetterStatement(ASTODAttribute attrWithValue)
    • createPresentCheckStatement

      protected String createPresentCheckStatement(String getter)
    • createGetterStatementForCand

      protected String createGetterStatementForCand(String statement)
    • createIsStatement

      protected String createIsStatement(String attrValue, boolean forCand)
    • createObjectString

      protected String createObjectString(String statement)
    • getODObject

      protected Optional<ASTODObject> getODObject(String objName)
    • isObjectWithoutStereoType

      protected boolean isObjectWithoutStereoType(ASTODObject object)