Package com.powsybl.commons.config
Class PlatformConfigNamedProvider.Finder
java.lang.Object
com.powsybl.commons.config.PlatformConfigNamedProvider.Finder
- Enclosing interface:
- PlatformConfigNamedProvider
A utility class to find providers in the
PlatformConfig
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 <jon.harper at rte-france.com>, Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <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) Deprecated.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 Details
-
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(since="3.2.0") 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(since="3.2.0") 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
-
find(java.lang.String, java.lang.String, java.lang.Class<T>, com.powsybl.commons.config.PlatformConfig)
instead