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.
| Modifier and Type | Field and Description |
|---|---|
| protected final Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PredictionContext | |
| public PredictionContext | |
| public int |
| cache | back to summary |
|---|---|
| protected final Map<PredictionContext, PredictionContext> cache | |
| PredictionContextCache | back to summary |
|---|---|
| public PredictionContextCache() | |
| add | back to summary |
|---|---|
| public PredictionContext add(PredictionContext ctx) 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 | back to summary |
|---|---|
| public PredictionContext get(PredictionContext ctx) | |
| size | back to summary |
|---|---|
| public int size() | |