Package io.jmix.flowui.sys
Class AbstractBasePackageConfigurationSorter<T extends AbstractScanConfiguration>
java.lang.Object
io.jmix.flowui.sys.AbstractBasePackageConfigurationSorter<T>
- Type Parameters:
T
- type of specific scan configuration
- Direct Known Subclasses:
ActionsConfigurationSorter
,ViewControllersConfigurationSorter
public abstract class AbstractBasePackageConfigurationSorter<T extends AbstractScanConfiguration>
extends Object
Provides base functionality to sort the list of scan configurations in the same order as Jmix modules have been sorted
using configuration base packages.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected long
charsCount
(String string, Character character) Returns count of specific character in a stringprotected JmixModuleDescriptor
evaluateJmixModule
(String basePackage) protected JmixModuleDescriptor
evaluateJmixModule
(Collection<String> basePackages) Finds Jmix module with a base package that matches any of givenbasePackages
.getBasePackages
(T configuration) protected boolean
isNestedSubpackage
(String package1, String package2) Returns true ifpackage1
is a subpackage ofpackage2
, e.g.
-
Field Details
-
jmixModules
-
-
Constructor Details
-
AbstractBasePackageConfigurationSorter
-
-
Method Details
-
sort
-
getBasePackages
-
evaluateJmixModule
Finds Jmix module with a base package that matches any of givenbasePackages
. Jmix module matches the package if its base package equals specified base package or if specified base package is a "subpackage" of Jmix module base package. -
evaluateJmixModule
-
isNestedSubpackage
Returns true ifpackage1
is a subpackage ofpackage2
, e.g. com.company.greeting.hello is a subpackage of com.company.greeting -
charsCount
Returns count of specific character in a string
-