|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.unitils.core.util.ConfigUtils
public class ConfigUtils
Class containing configuration related utilities
| Constructor Summary | |
|---|---|
ConfigUtils()
|
|
| Method Summary | ||
|---|---|---|
static String |
getConfiguredClassName(Class<?> type,
Properties configuration,
String... implementationDiscriminatorValues)
Retrieves the class name of the concrete instance of the class with the given type as configured by the given Configuration. |
|
static
|
getConfiguredInstanceOf(Class<? extends T> type,
Properties configuration,
String... implementationDiscriminatorValues)
Retrieves the concrete instance of the class with the given type as configured by the given Configuration. |
|
static
|
getInstanceOf(Class<? extends T> type,
Properties configuration,
String... implementationDiscriminatorValues)
Retrieves the concrete instance of the class with the given type as configured by the given Configuration. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigUtils()
| Method Detail |
|---|
public static <T extends Configurable> T getConfiguredInstanceOf(Class<? extends T> type,
Properties configuration,
String... implementationDiscriminatorValues)
Configuration.
Tries to retrieve a specific implementation first (propery key = fully qualified name of the interface
type + '.impl.className.' + implementationDiscriminatorValue). If this key does not exist, the generally configured
instance is retrieved (same property key without the implementationDiscriminatorValue).
type - The type of the instanceconfiguration - The configuration containing the necessary properties for configuring the instanceimplementationDiscriminatorValues - The values that define which specific implementation class should be used.
This is typically an environment specific property, like the DBMS that is used.
public static <T> T getInstanceOf(Class<? extends T> type,
Properties configuration,
String... implementationDiscriminatorValues)
Configuration.
Tries to retrieve a specific implementation first (propery key = fully qualified name of the interface
type + '.impl.className.' + implementationDiscriminatorValue). If this key does not exist, the generally configured
instance is retrieved (same property key without the implementationDiscriminatorValue).
type - The type of the instanceconfiguration - The configuration containing the necessary properties for configuring the instanceimplementationDiscriminatorValues - The values that define which specific implementation class should be used.
This is typically an environment specific property, like the DBMS that is used.
public static String getConfiguredClassName(Class<?> type,
Properties configuration,
String... implementationDiscriminatorValues)
Configuration.
Tries to retrieve a specific implementation first (propery key = fully qualified name of the interface
type + '.impl.className.' + implementationDiscriminatorValue). If this key does not exist, the generally configured
instance is retrieved (same property key without the implementationDiscriminatorValue).
type - The type of the instanceconfiguration - The configuration containing the necessary properties for configuring the instanceimplementationDiscriminatorValues - The values that define which specific implementation class should be used.
This is typically an environment specific property, like the DBMS that is used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||