Record Class ThreadModeSettings
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.ThreadModeSettings
- Record Components:
checkerThreadsNumber- the Checker threads numbertreeWalkerThreadsNumber- the TreeWalker threads number
- All Implemented Interfaces:
Serializable
public record ThreadModeSettings(int checkerThreadsNumber, int treeWalkerThreadsNumber)
extends Record
implements Serializable
Thread mode settings for the checkstyle modules.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA checker module name.private final intThe field for thecheckerThreadsNumberrecord component.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 field for thetreeWalkerThreadsNumberrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionThreadModeSettings(int checkerThreadsNumber, int treeWalkerThreadsNumber) Creates an instance of aThreadModeSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecheckerThreadsNumberrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.resolveName(String name) Resolves the module name according to the thread settings.final StringtoString()Returns a string representation of this record class.intReturns the value of thetreeWalkerThreadsNumberrecord component.
-
Field Details
-
checkerThreadsNumber
private final int checkerThreadsNumberThe field for thecheckerThreadsNumberrecord component. -
treeWalkerThreadsNumber
private final int treeWalkerThreadsNumberThe field for thetreeWalkerThreadsNumberrecord component. -
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:
-
-
Constructor Details
-
ThreadModeSettings
public ThreadModeSettings(int checkerThreadsNumber, int treeWalkerThreadsNumber) Creates an instance of aThreadModeSettingsrecord class.- Parameters:
checkerThreadsNumber- the value for thecheckerThreadsNumberrecord componenttreeWalkerThreadsNumber- the value for thetreeWalkerThreadsNumberrecord component
-
-
Method Details
-
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
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
checkerThreadsNumber
public int checkerThreadsNumber()Returns the value of thecheckerThreadsNumberrecord component.- Returns:
- the value of the
checkerThreadsNumberrecord component
-
treeWalkerThreadsNumber
public int treeWalkerThreadsNumber()Returns the value of thetreeWalkerThreadsNumberrecord component.- Returns:
- the value of the
treeWalkerThreadsNumberrecord component
-