Class InjectionCounter
java.lang.Object
org.ek9lang.compiler.phase5.InjectionCounter
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidIncrement the injection count for the current scope.(package private) booleanCheck if there are any scopes on the stack.(package private) intpopScope()Pop scope and return injection count.(package private) voidPush new scope when entering function/method/operator.
-
Constructor Details
-
InjectionCounter
InjectionCounter()
-
-
Method Details
-
pushScope
void pushScope()Push new scope when entering function/method/operator. -
popScope
int popScope()Pop scope and return injection count.- Returns:
- the total injection count in this scope
-
incrementCount
void incrementCount()Increment the injection count for the current scope. -
isNotEmpty
boolean isNotEmpty()Check if there are any scopes on the stack.
-