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 String
A checker module name.private final int
The checker threads number.static final String
A multi thread checker module name.static final String
A multi thread three walker module name.private static final long
A unique serial version identifier.static final ThreadModeSettings
A single thread mode settings instance.static final String
A three walker module name.private final int
The tree walker threads number. -
Constructor Summary
ConstructorsConstructorDescriptionThreadModeSettings
(int checkerThreadsNumber, int treeWalkerThreadsNumber) Initializes the thread mode configuration. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of threads for the Checker module.int
Gets the number of threads for the TreeWalker module.final String
resolveName
(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
A unique serial version identifier.- See Also:
-
checkerThreadsNumber
The checker threads number. -
treeWalkerThreadsNumber
The tree walker threads number.
-
-
Constructor Details
-
ThreadModeSettings
Initializes the thread mode configuration.- Parameters:
checkerThreadsNumber
- the Checker threads numbertreeWalkerThreadsNumber
- the TreeWalker threads number
-
-
Method Details
-
getCheckerThreadsNumber
Gets the number of threads for the Checker module.- Returns:
- the number of threads for the Checker module.
-
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
-