Class CompositeLexerContextCache.StringTemplateContext
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.grammar.CompositeLexerContextCache.StringTemplateContext
-
- Enclosing class:
- CompositeLexerContextCache
private static final class CompositeLexerContextCache.StringTemplateContext extends Object
A class to represent the context of a string template.
-
-
Field Summary
Fields Modifier and Type Field Description private int
curlyBraceDepth
The depth of this context.private int
mode
The lexer mode of this context.
-
Constructor Summary
Constructors Modifier Constructor Description private
StringTemplateContext(int mode, int curlyBraceDepth)
Creates a new TemplateContext instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCurlyBraceDepth()
Current depth of this context.int
getMode()
Get the lexer mode of this context.
-
-
-
Field Detail
-
mode
private final int mode
The lexer mode of this context.
-
curlyBraceDepth
private final int curlyBraceDepth
The depth of this context.
-
-
Constructor Detail
-
StringTemplateContext
private StringTemplateContext(int mode, int curlyBraceDepth)
Creates a new TemplateContext instance.- Parameters:
mode
- the lexer mode of this contextcurlyBraceDepth
- the depth of this context
-
-
Method Detail
-
getMode
public int getMode()
Get the lexer mode of this context.- Returns:
- current lexer mode
-
getCurlyBraceDepth
public int getCurlyBraceDepth()
Current depth of this context.- Returns:
- current depth
-
-