Package org.openrewrite.java.style
Class ImportLayoutStyle.Block.ImportPackage
- java.lang.Object
-
- org.openrewrite.java.style.ImportLayoutStyle.Block.ImportPackage
-
- All Implemented Interfaces:
ImportLayoutStyle.Block
- Direct Known Subclasses:
ImportLayoutStyle.Block.AllOthers
- Enclosing interface:
- ImportLayoutStyle.Block
public static class ImportLayoutStyle.Block.ImportPackage extends java.lang.Object implements ImportLayoutStyle.Block
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openrewrite.java.style.ImportLayoutStyle.Block
ImportLayoutStyle.Block.AllOthers, ImportLayoutStyle.Block.BlankLines, ImportLayoutStyle.Block.ImportPackage
-
-
Constructor Summary
Constructors Constructor Description ImportPackage(java.lang.Boolean statik, java.lang.String packageWildcard, boolean withSubpackages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(JRightPadded<J.Import> anImport)This method will determine if the passed in import is a match for the rules defined on the block.java.util.regex.PatterngetPackageWildcard()booleanisStatic()java.util.List<JRightPadded<J.Import>>orderedImports(org.openrewrite.java.style.ImportLayoutStyle.LayoutState layoutState, int classCountToUseStarImport, int nameCountToUseStarImport, org.openrewrite.java.style.ImportLayoutStyle.ImportLayoutConflictDetection importLayoutConflictDetection, java.util.List<ImportLayoutStyle.Block> packagesToFold)java.lang.StringtoString()
-
-
-
Method Detail
-
isStatic
public boolean isStatic()
-
getPackageWildcard
public java.util.regex.Pattern getPackageWildcard()
-
accept
public boolean accept(JRightPadded<J.Import> anImport)
Description copied from interface:ImportLayoutStyle.BlockThis method will determine if the passed in import is a match for the rules defined on the block. If the import is matched, it will be internally stored in the block.- Specified by:
acceptin interfaceImportLayoutStyle.Block- Parameters:
anImport- The import to be compared against the block's matching rules.- Returns:
trueif the import was a match
-
orderedImports
public java.util.List<JRightPadded<J.Import>> orderedImports(org.openrewrite.java.style.ImportLayoutStyle.LayoutState layoutState, int classCountToUseStarImport, int nameCountToUseStarImport, org.openrewrite.java.style.ImportLayoutStyle.ImportLayoutConflictDetection importLayoutConflictDetection, java.util.List<ImportLayoutStyle.Block> packagesToFold)
- Specified by:
orderedImportsin interfaceImportLayoutStyle.Block- Returns:
- Imports belonging to this block, folded appropriately.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-