Modifier and Type | Class and Description |
---|---|
static interface |
StaticOptimizations.Loader<T>
Interface for an optimization which will be injected via
service loading.
|
Constructor and Description |
---|
StaticOptimizations() |
Modifier and Type | Method and Description |
---|---|
static void |
cacheEnvironment()
Enables environment caching.
|
static <T> Optional<T> |
get(Class<T> optimizationClass)
Returns, if available, the optimization data of the requested
type.
|
static boolean |
isEnvironmentCached()
Returns true if the environment should be cached, that is to say
if the environment variables and system properties are deemed
immutable during the whole application run time.
|
static <T> void |
set(T value)
Injects an optimization.
|
public static void cacheEnvironment()
@NonNull public static <T> Optional<T> get(@NonNull Class<T> optimizationClass)
T
- the optimization typeoptimizationClass
- the type of the optimization classpublic static <T> void set(@NonNull T value)
T
- the type of the optimizationvalue
- the optimization to storepublic static boolean isEnvironmentCached()