Package org.sonar.sslr.toolkit
Class AbstractConfigurationModel
- java.lang.Object
-
- org.sonar.sslr.toolkit.AbstractConfigurationModel
-
- All Implemented Interfaces:
ConfigurationModel
public abstract class AbstractConfigurationModel extends Object implements ConfigurationModel
This class provides an default optimized implementation of theConfigurationModelinterface. It will call thedoGetParser()anddoGetTokenizers()methods only when a change to the configuration has been made.- Since:
- 1.17
-
-
Constructor Summary
Constructors Constructor Description AbstractConfigurationModel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ParserdoGetParser()Gets a parser instance reflecting the current configuration state.abstract List<org.sonar.colorizer.Tokenizer>doGetTokenizers()Gets tokenizers reflecting the current configuration state.CharsetgetCharset()Gets the charset reflecting the current configuration state.ParsergetParser()Gets a parser instance reflecting the current configuration state.List<org.sonar.colorizer.Tokenizer>getTokenizers()Gets tokenizers reflecting the current configuration state.voidsetUpdatedFlag()This method is called each time a configuration property's value is changed.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sonar.sslr.toolkit.ConfigurationModel
getProperties
-
-
-
-
Method Detail
-
setUpdatedFlag
public void setUpdatedFlag()
Description copied from interface:ConfigurationModelThis method is called each time a configuration property's value is changed.- Specified by:
setUpdatedFlagin interfaceConfigurationModel
-
getCharset
public Charset getCharset()
Gets the charset reflecting the current configuration state.- Specified by:
getCharsetin interfaceConfigurationModel- Returns:
- Charset for the current configuration
-
getParser
public Parser getParser()
Description copied from interface:ConfigurationModelGets a parser instance reflecting the current configuration state.- Specified by:
getParserin interfaceConfigurationModel- Returns:
- A parser for the current configuration
-
getTokenizers
public List<org.sonar.colorizer.Tokenizer> getTokenizers()
Description copied from interface:ConfigurationModelGets tokenizers reflecting the current configuration state.- Specified by:
getTokenizersin interfaceConfigurationModel- Returns:
- Tokenizers for the current configuration
-
doGetParser
public abstract Parser doGetParser()
Gets a parser instance reflecting the current configuration state. This method will not be called twice in a row without a change in the configuration state.- Returns:
- A parser for the current configuration
-
doGetTokenizers
public abstract List<org.sonar.colorizer.Tokenizer> doGetTokenizers()
Gets tokenizers reflecting the current configuration state. This method will not be called twice in a row without a change in the configuration state.- Returns:
- Tokenizers for the current configuration
-
-