java.lang.Object
de.monticore.generating.templateengine.reporting.commons.ObjectCountVisitor
All Implemented Interfaces:
IVisitor

public class ObjectCountVisitor extends Object implements IVisitor
We use this visit mechanism to count instances of AST-Node-Types classes. The type2count member maps the AST-Node-Type as String to it's object count.
  • Field Details

    • type2count

      protected Map<String,Integer> type2count
    • type2countPos

      protected Map<String,Integer> type2countPos
    • totalCount

      protected int totalCount
    • maxDepth

      protected int maxDepth
    • depth

      protected int depth
  • Constructor Details

    • ObjectCountVisitor

      public ObjectCountVisitor()
      Constructor for reporting.ObjectCountVisitor
  • Method Details

    • visit

      public void visit(ASTNode a)
      Specified by:
      visit in interface IVisitor
    • endVisit

      public void endVisit(ASTNode a)
      Specified by:
      endVisit in interface IVisitor
    • getObjectCountMap

      public Map<String,Integer> getObjectCountMap()
      Return the result map
    • getObjectCountMapPos

      public Map<String,Integer> getObjectCountMapPos()
      Return the result map
    • getTotalCount

      public int getTotalCount()
      Return the total object count
    • getMaxDepth

      public int getMaxDepth()
      Return the max depth
    • clear

      public void clear()