Class ImportLayoutStyle.Block.ImportPackage

    • Constructor Detail

      • ImportPackage

        public ImportPackage​(java.lang.Boolean statik,
                             java.lang.String packageWildcard,
                             boolean withSubpackages)
    • 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.Block
        This 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:
        accept in interface ImportLayoutStyle.Block
        Parameters:
        anImport - The import to be compared against the block's matching rules.
        Returns:
        true if 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:
        orderedImports in interface ImportLayoutStyle.Block
        Returns:
        Imports belonging to this block, folded appropriately.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object