Package com.puppycrawl.tools.checkstyle
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 String
A checker module name.private final int
The field for thecheckerThreadsNumber
record component.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 field for thetreeWalkerThreadsNumber
record component. -
Constructor Summary
ConstructorsConstructorDescriptionThreadModeSettings
(int checkerThreadsNumber, int treeWalkerThreadsNumber) Creates an instance of aThreadModeSettings
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecheckerThreadsNumber
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.resolveName
(String name) Resolves the module name according to the thread settings.final String
toString()
Returns a string representation of this record class.int
Returns the value of thetreeWalkerThreadsNumber
record component.
-
Field Details
-
checkerThreadsNumber
The field for thecheckerThreadsNumber
record component. -
treeWalkerThreadsNumber
The field for thetreeWalkerThreadsNumber
record 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
A unique serial version identifier.- See Also:
-
-
Constructor Details
-
ThreadModeSettings
Creates an instance of aThreadModeSettings
record class.- Parameters:
checkerThreadsNumber
- the value for thecheckerThreadsNumber
record componenttreeWalkerThreadsNumber
- the value for thetreeWalkerThreadsNumber
record 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
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
checkerThreadsNumber
Returns the value of thecheckerThreadsNumber
record component.- Returns:
- the value of the
checkerThreadsNumber
record component
-
treeWalkerThreadsNumber
Returns the value of thetreeWalkerThreadsNumber
record component.- Returns:
- the value of the
treeWalkerThreadsNumber
record component
-