Package cpw.mods.modlauncher
Class Environment
java.lang.Object
cpw.mods.modlauncher.Environment
- All Implemented Interfaces:
IEnvironment
Environment implementation class
-
Nested Class Summary
Nested classes/interfaces inherited from interface cpw.mods.modlauncher.api.IEnvironment
IEnvironment.Keys
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
computePropertyIfAbsent
(TypesafeMap.Key<T> key, Function<? super TypesafeMap.Key<T>, ? extends T> valueFunction) Compute a new value for insertion into the environment, if not already present.findLaunchHandler
(String name) Find the namedILaunchHandlerService
findLaunchPlugin
(String name) Find the namedILaunchPluginService
final <T> Optional
<T> getProperty
(TypesafeMap.Key<T> key) Get a property from the Environment
-
Field Details
-
environment
-
launcher
-
-
Constructor Details
-
Environment
Environment(Launcher launcher)
-
-
Method Details
-
getProperty
Description copied from interface:IEnvironment
Get a property from the Environment- Specified by:
getProperty
in interfaceIEnvironment
- Type Parameters:
T
- Type of key- Parameters:
key
- to find- Returns:
- the value
-
findLaunchPlugin
Description copied from interface:IEnvironment
Find the namedILaunchPluginService
- Specified by:
findLaunchPlugin
in interfaceIEnvironment
- Parameters:
name
- name to lookup- Returns:
- the launch plugin
-
findLaunchHandler
Description copied from interface:IEnvironment
Find the namedILaunchHandlerService
- Specified by:
findLaunchHandler
in interfaceIEnvironment
- Parameters:
name
- name to lookup- Returns:
- the launch handler
-
findModuleLayerManager
- Specified by:
findModuleLayerManager
in interfaceIEnvironment
-
computePropertyIfAbsent
public <T> T computePropertyIfAbsent(TypesafeMap.Key<T> key, Function<? super TypesafeMap.Key<T>, ? extends T> valueFunction) Description copied from interface:IEnvironment
Compute a new value for insertion into the environment, if not already present.- Specified by:
computePropertyIfAbsent
in interfaceIEnvironment
- Type Parameters:
T
- Type of key- Parameters:
key
- to insertvalueFunction
- the supplier of a value- Returns:
- The value of the key
-