Module com.powsybl.commons
Package com.powsybl.commons.config
Class PlatformConfigNamedProvider.Finder
- java.lang.Object
-
- com.powsybl.commons.config.PlatformConfigNamedProvider.Finder
-
- Enclosing interface:
- PlatformConfigNamedProvider
public static final class PlatformConfigNamedProvider.Finder extends Object
A utility class to find providers in thePlatformConfig
by their names configured in standard fields. the find* methods use the standard fields while the find*BackwardsCompatible methods also look in the legacy fields.- Author:
- Jon harper
, Geoffroy Jamgotchian
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T extends PlatformConfigNamedProvider>
Tfind(String name, String moduleName, Class<T> clazz, PlatformConfig platformConfig)
Find the provider among theproviders
based on itsname
, or ifname
is null find the default provider like @{link findDefault}static <T extends PlatformConfigNamedProvider>
TfindBackwardsCompatible(String name, String moduleName, Class<T> clazz, PlatformConfig platformConfig)
static <T extends PlatformConfigNamedProvider>
TfindDefault(String moduleName, Class<T> clazz, PlatformConfig platformConfig)
Find the default provider configured in the standard field ofmoduleName
inplatformConfig
among theproviders
arguments based on its name.static <T extends PlatformConfigNamedProvider>
TfindDefaultBackwardsCompatible(String moduleName, Class<T> clazz, PlatformConfig platformConfig)
Deprecated.
-
-
-
Method Detail
-
findDefault
public static <T extends PlatformConfigNamedProvider> T findDefault(String moduleName, Class<T> clazz, PlatformConfig platformConfig)
Find the default provider configured in the standard field ofmoduleName
inplatformConfig
among theproviders
arguments based on its name.- Returns:
- the provider
-
find
public static <T extends PlatformConfigNamedProvider> T find(String name, String moduleName, Class<T> clazz, PlatformConfig platformConfig)
Find the provider among theproviders
based on itsname
, or ifname
is null find the default provider like @{link findDefault}- Returns:
- the provider
-
findDefaultBackwardsCompatible
@Deprecated public static <T extends PlatformConfigNamedProvider> T findDefaultBackwardsCompatible(String moduleName, Class<T> clazz, PlatformConfig platformConfig)
Deprecated.Find the default provider configured in the standard field or the legacy field ofmoduleName
inplatformConfig
among theproviders
arguments based on its name.- Returns:
- the provider
-
findBackwardsCompatible
@Deprecated public static <T extends PlatformConfigNamedProvider> T findBackwardsCompatible(String name, String moduleName, Class<T> clazz, PlatformConfig platformConfig)
Deprecated.Find the provider among theproviders
based on itsname
, or ifname
is null find the default provider like @{link findDefaultBackwardsCompatible}- Returns:
- the provider
-
-