Class ParserAtnManager
java.lang.Object
org.apache.groovy.parser.antlr4.internal.atnmanager.AtnManager
org.apache.groovy.parser.antlr4.internal.atnmanager.ParserAtnManager
Manage ATN for parser to avoid memory leak
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.groovy.parser.antlr4.internal.atnmanager.AtnManager
AtnManager.AtnWrapper -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParserAtnManagerShared manager for the parser ATN.Fields inherited from class org.apache.groovy.parser.antlr4.internal.atnmanager.AtnManager
READ_LOCK -
Method Summary
Modifier and TypeMethodDescriptionprotected AtnManager.AtnWrapperCreates the wrapper installed whenAtnManager.getAtnWrapper()finds no live reference.protected booleanWhether this manager participates in cache dropping.Methods inherited from class org.apache.groovy.parser.antlr4.internal.atnmanager.AtnManager
getATN, getAtnWrapper
-
Field Details
-
INSTANCE
Shared manager for the parser ATN.
-
-
Method Details
-
createAtnWrapper
Description copied from class:AtnManagerCreates the wrapper installed whenAtnManager.getAtnWrapper()finds no live reference.- Specified by:
createAtnWrapperin classAtnManager- Returns:
- a wrapper owning a fresh ATN
-
shouldClearDfaCache
protected boolean shouldClearDfaCache()Description copied from class:AtnManagerWhether this manager participates in cache dropping. Dropping also requires the global policy: a negativegroovy.antlr4.cache.thresholdswitches it off.- Specified by:
shouldClearDfaCachein classAtnManager- Returns:
truewhen this manager's caches may be retired
-