Class ParserAtnManager

java.lang.Object
org.apache.groovy.parser.antlr4.internal.atnmanager.AtnManager
org.apache.groovy.parser.antlr4.internal.atnmanager.ParserAtnManager

public class ParserAtnManager extends AtnManager
Manage ATN for parser to avoid memory leak
  • Field Details

    • INSTANCE

      public static final ParserAtnManager INSTANCE
      Shared manager for the parser ATN.
  • Method Details

    • createAtnWrapper

      protected AtnManager.AtnWrapper createAtnWrapper()
      Description copied from class: AtnManager
      Creates the wrapper installed when AtnManager.getAtnWrapper() finds no live reference.
      Specified by:
      createAtnWrapper in class AtnManager
      Returns:
      a wrapper owning a fresh ATN
    • shouldClearDfaCache

      protected boolean shouldClearDfaCache()
      Description copied from class: AtnManager
      Whether this manager participates in cache dropping. Dropping also requires the global policy: a negative groovy.antlr4.cache.threshold switches it off.
      Specified by:
      shouldClearDfaCache in class AtnManager
      Returns:
      true when this manager's caches may be retired