Class InjectionCounter

java.lang.Object
org.ek9lang.compiler.phase5.IntScopeCounter
org.ek9lang.compiler.phase5.InjectionCounter

class InjectionCounter extends IntScopeCounter
Tracks injection counts within functions/methods/operators. Increments when a variable declaration with '!' (BANG) is encountered. Used to store injection count as squirrelled data for metrics display.

A '!' injection can also appear as a class property, outside any function/method scope, so incrementCount() silently ignores an increment when no scope is open.

  • Constructor Details

    • InjectionCounter

      InjectionCounter()
  • Method Details

    • incrementCount

      void incrementCount()
      Increment the injection count for the current scope, if one is open.