Class MethodCallCollector

java.lang.Object
io.sundr.model.repo.MethodCallCollector
All Implemented Interfaces:
Visitor<MethodCallFluent<?>>

public class MethodCallCollector extends Object implements Visitor<MethodCallFluent<?>>
Visitor that collects all MethodCall objects from a visitable AST structure. The visitor pattern automatically traverses the entire AST, so this just collects every MethodCall it encounters.
  • Constructor Details

    • MethodCallCollector

      public MethodCallCollector()
  • Method Details

    • visit

      public void visit(MethodCallFluent<?> methodCallFluent)
      Specified by:
      visit in interface Visitor<MethodCallFluent<?>>
    • getMethodCalls

      public Set<MethodCall> getMethodCalls()
      Get all collected method calls
    • clear

      public void clear()
      Clear the collected method calls (useful for reusing the collector)