Top Description Inners Fields Constructors Methods
ch.qos.logback.core.pattern.parser

pack-priv Class TokenStream

extends Object
Class Inheritance
Imports
java.util.List, .ArrayList, ch.qos.logback.core.CoreConstants, ch.qos.logback.core.pattern.util.IEscapeUtil, .RegularEscapeUtil, .RestrictedEscapeUtil, ch.qos.logback.core.spi.ScanException

Return a steady stream of tokens.

The returned tokens are one of: LITERAL, '%', FORMAT_MODIFIER, SIMPLE_KEYWORD, COMPOSITE_KEYWORD OPTION, LEFT_PARENTHESIS, and RIGHT_PARENTHESIS.

The '\' character is used as escape. It can be used to escape '_', '%', '(' and '('.

Note that there is no EOS token returned.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
pack-priv final IEscapeUtil
pack-priv final IEscapeUtil
pack-priv final String
pack-priv final int
pack-priv int
pack-priv TokenStream.TokenizerState

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
TokenStream(String pattern, IEscapeUtil escapeUtil)

Method Summary

Modifier and TypeMethod and Description
private void
addValuedToken(int type, StringBuffer buf, List<Token> tokenList)

pack-priv void
escape(String escapeChars, StringBuffer buf)

private void
private void
handleKeywordState(char c, List<Token> tokenList, StringBuffer buf)

private void
handleLiteralState(char c, List<Token> tokenList, StringBuffer buf)

private void
pack-priv void
optionEscape(String escapeChars, StringBuffer buf)

private void
processOption(char c, List<Token> tokenList, StringBuffer buf)

pack-priv List<Token>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

escapeUtilback to summary
pack-priv final IEscapeUtil escapeUtil
optionEscapeUtilback to summary
pack-priv final IEscapeUtil optionEscapeUtil
patternback to summary
pack-priv final String pattern
patternLengthback to summary
pack-priv final int patternLength
pointerback to summary
pack-priv int pointer
stateback to summary
pack-priv TokenStream.TokenizerState state

Constructor Detail

TokenStreamback to summary
pack-priv TokenStream(String pattern)
TokenStreamback to summary
pack-priv TokenStream(String pattern, IEscapeUtil escapeUtil)

Method Detail

addValuedTokenback to summary
private void addValuedToken(int type, StringBuffer buf, List<Token> tokenList)
escapeback to summary
pack-priv void escape(String escapeChars, StringBuffer buf)
handleFormatModifierStateback to summary
private void handleFormatModifierState(char c, List<Token> tokenList, StringBuffer buf)
handleKeywordStateback to summary
private void handleKeywordState(char c, List<Token> tokenList, StringBuffer buf)
handleLiteralStateback to summary
private void handleLiteralState(char c, List<Token> tokenList, StringBuffer buf)
handleRightParenthesisStateback to summary
private void handleRightParenthesisState(char c, List<Token> tokenList, StringBuffer buf)
optionEscapeback to summary
pack-priv void optionEscape(String escapeChars, StringBuffer buf)
processOptionback to summary
private void processOption(char c, List<Token> tokenList, StringBuffer buf) throws ScanException
tokenizeback to summary
pack-priv List<Token> tokenize() throws ScanException
ch.qos.logback.core.pattern.parser back to summary

pack-priv final Enum TokenStream.TokenizerState

extends Enum<TokenStream.TokenizerState>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final TokenStream.TokenizerState
public static final TokenStream.TokenizerState
public static final TokenStream.TokenizerState
public static final TokenStream.TokenizerState
public static final TokenStream.TokenizerState

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TokenStream.TokenizerState
public static TokenStream.TokenizerState[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FORMAT_MODIFIER_STATEback to summary
public static final TokenStream.TokenizerState FORMAT_MODIFIER_STATE
KEYWORD_STATEback to summary
public static final TokenStream.TokenizerState KEYWORD_STATE
LITERAL_STATEback to summary
public static final TokenStream.TokenizerState LITERAL_STATE
OPTION_STATEback to summary
public static final TokenStream.TokenizerState OPTION_STATE
RIGHT_PARENTHESIS_STATEback to summary
public static final TokenStream.TokenizerState RIGHT_PARENTHESIS_STATE

Constructor Detail

TokenizerStateback to summary
private TokenizerState()

Method Detail

valueOfback to summary
public static TokenStream.TokenizerState valueOf(String name)
valuesback to summary
public static TokenStream.TokenizerState[] values()