Package com.puppycrawl.tools.checkstyle
Class ThreadModeSettings
java.lang.Object
com.puppycrawl.tools.checkstyle.ThreadModeSettings
- All Implemented Interfaces:
Serializable
Thread mode settings for the checkstyle modules.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA checker module name.private final intThe checker threads number.static final StringA multi thread checker module name.static final StringA multi thread three walker module name.private static final longA unique serial version identifier.static final ThreadModeSettingsA single thread mode settings instance.static final StringA three walker module name.private final intThe tree walker threads number. -
Constructor Summary
ConstructorsConstructorDescriptionThreadModeSettings(int checkerThreadsNumber, int treeWalkerThreadsNumber) Initializes the thread mode configuration. -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of threads for the Checker module.intGets the number of threads for the TreeWalker module.final StringresolveName(String name) Resolves the module name according to the thread settings.
-
Field Details
-
CHECKER_MODULE_NAME
A checker module name. -
MULTI_THREAD_CHECKER_MODULE_NAME
A multi thread checker module name. -
TREE_WALKER_MODULE_NAME
A three walker module name. -
MULTI_THREAD_TREE_WALKER_MODULE_NAME
A multi thread three walker module name. -
SINGLE_THREAD_MODE_INSTANCE
A single thread mode settings instance. -
serialVersionUID
private static final long serialVersionUIDA unique serial version identifier.- See Also:
-
checkerThreadsNumber
private final int checkerThreadsNumberThe checker threads number. -
treeWalkerThreadsNumber
private final int treeWalkerThreadsNumberThe tree walker threads number.
-
-
Constructor Details
-
ThreadModeSettings
public ThreadModeSettings(int checkerThreadsNumber, int treeWalkerThreadsNumber) Initializes the thread mode configuration.- Parameters:
checkerThreadsNumber- the Checker threads numbertreeWalkerThreadsNumber- the TreeWalker threads number
-
-
Method Details
-
getCheckerThreadsNumber
public int getCheckerThreadsNumber()Gets the number of threads for the Checker module.- Returns:
- the number of threads for the Checker module.
-
getTreeWalkerThreadsNumber
public int getTreeWalkerThreadsNumber()Gets the number of threads for the TreeWalker module.- Returns:
- the number of threads for the TreeWalker module.
-
resolveName
Resolves the module name according to the thread settings.- Parameters:
name- The original module name.- Returns:
- resolved module name.
- Throws:
IllegalArgumentException- when name is Checker or TreeWalker
-