Package com.puppycrawl.tools.checkstyle
Class ThreadModeSettings
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.ThreadModeSettings
-
- All Implemented Interfaces:
java.io.Serializable
public class ThreadModeSettings extends java.lang.Object implements java.io.SerializableThread mode settings for the checkstyle modules.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCHECKER_MODULE_NAMEA checker module name.static java.lang.StringMULTI_THREAD_CHECKER_MODULE_NAMEA multi thread checker module name.static java.lang.StringMULTI_THREAD_TREE_WALKER_MODULE_NAMEA multi thread three walker module name.static ThreadModeSettingsSINGLE_THREAD_MODE_INSTANCEA single thread mode settings instance.static java.lang.StringTREE_WALKER_MODULE_NAMEA three walker module name.
-
Constructor Summary
Constructors Constructor Description ThreadModeSettings(int checkerThreadsNumber, int treeWalkerThreadsNumber)Initializes the thread mode configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCheckerThreadsNumber()Gets the number of threads for the Checker module.intgetTreeWalkerThreadsNumber()Gets the number of threads for the TreeWalker module.java.lang.StringresolveName(java.lang.String name)Resolves the module name according to the thread settings.
-
-
-
Field Detail
-
CHECKER_MODULE_NAME
public static final java.lang.String CHECKER_MODULE_NAME
A checker module name.
-
MULTI_THREAD_CHECKER_MODULE_NAME
public static final java.lang.String MULTI_THREAD_CHECKER_MODULE_NAME
A multi thread checker module name.
-
TREE_WALKER_MODULE_NAME
public static final java.lang.String TREE_WALKER_MODULE_NAME
A three walker module name.
-
MULTI_THREAD_TREE_WALKER_MODULE_NAME
public static final java.lang.String MULTI_THREAD_TREE_WALKER_MODULE_NAME
A multi thread three walker module name.
-
SINGLE_THREAD_MODE_INSTANCE
public static final ThreadModeSettings SINGLE_THREAD_MODE_INSTANCE
A single thread mode settings instance.
-
-
Method Detail
-
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
public final java.lang.String resolveName(java.lang.String name)
Resolves the module name according to the thread settings.- Parameters:
name- The original module name.- Returns:
- resolved module name.
- Throws:
java.lang.IllegalArgumentException- when name is Checker or TreeWalker
-
-