Class ThreadModeSettings

java.lang.Object
com.puppycrawl.tools.checkstyle.ThreadModeSettings
All Implemented Interfaces:
Serializable

public class ThreadModeSettings extends Object implements Serializable
Thread mode settings for the checkstyle modules.
See Also:
  • Field Details

    • CHECKER_MODULE_NAME

      public static final String CHECKER_MODULE_NAME
      A checker module name.
    • MULTI_THREAD_CHECKER_MODULE_NAME

      public static final String MULTI_THREAD_CHECKER_MODULE_NAME
      A multi thread checker module name.
    • TREE_WALKER_MODULE_NAME

      public static final String TREE_WALKER_MODULE_NAME
      A three walker module name.
    • MULTI_THREAD_TREE_WALKER_MODULE_NAME

      public static final 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.
  • Constructor Details

    • ThreadModeSettings

      public ThreadModeSettings(int checkerThreadsNumber, int treeWalkerThreadsNumber)
      Initializes the thread mode configuration.
      Parameters:
      checkerThreadsNumber - the Checker threads number
      treeWalkerThreadsNumber - 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

      public final String resolveName(String name)
      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