Class PredictionContextCache
java.lang.Object
org.graalvm.shadowed.org.antlr.v4.runtime.atn.PredictionContextCache
Used to cache
PredictionContext objects. Its used for the shared
context cash associated with contexts in DFA states. This cache
can be used for both lexers and parsers.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(PredictionContext ctx) Add a context to the cache and return it.get(PredictionContext ctx) intsize()
-
Field Details
-
cache
-
-
Constructor Details
-
PredictionContextCache
public PredictionContextCache()
-
-
Method Details
-
add
Add a context to the cache and return it. If the context already exists, return that one instead and do not add a new context to the cache. Protect shared cache from unsafe thread access. -
get
-
size
public int size()
-