Record Class CustomImportOrderCheck.ImportDetails
java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck.ImportDetails
- Record Components:
importFullPath- import full pathimportGroup- import groupstaticImport- if import is staticimportAST- import AST
- Enclosing class:
CustomImportOrderCheck
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DetailASTThe field for theimportASTrecord component.private final StringThe field for theimportFullPathrecord component.private final StringThe field for theimportGrouprecord component.private final booleanThe field for thestaticImportrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImportDetails(String importFullPath, String importGroup, boolean staticImport, DetailAST importAST) Creates an instance of aImportDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.(package private) intGet import end line number from ast.(package private) intGet import start line number from ast.final inthashCode()Returns a hash code value for this object.Returns the value of theimportASTrecord component.Returns the value of theimportFullPathrecord component.Returns the value of theimportGrouprecord component.booleanReturns the value of thestaticImportrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
importFullPath
The field for theimportFullPathrecord component. -
importGroup
The field for theimportGrouprecord component. -
staticImport
private final boolean staticImportThe field for thestaticImportrecord component. -
importAST
-
-
Constructor Details
-
ImportDetails
private ImportDetails(String importFullPath, String importGroup, boolean staticImport, DetailAST importAST) Creates an instance of aImportDetailsrecord class.- Parameters:
importFullPath- the value for theimportFullPathrecord componentimportGroup- the value for theimportGrouprecord componentstaticImport- the value for thestaticImportrecord componentimportAST- the value for theimportASTrecord component
-
-
Method Details
-
getStartLineNumber
int getStartLineNumber()Get import start line number from ast.- Returns:
- import start line from ast.
-
getEndLineNumber
int getEndLineNumber()Get import end line number from ast.Note: It can be different from startLineNumber when import statement span multiple lines.
- Returns:
- import end line from ast.
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
importFullPath
Returns the value of theimportFullPathrecord component.- Returns:
- the value of the
importFullPathrecord component
-
importGroup
Returns the value of theimportGrouprecord component.- Returns:
- the value of the
importGrouprecord component
-
staticImport
public boolean staticImport()Returns the value of thestaticImportrecord component.- Returns:
- the value of the
staticImportrecord component
-
importAST
-