Package org.spongepowered.asm.launch
Class GlobalProperties
- java.lang.Object
-
- org.spongepowered.asm.launch.GlobalProperties
-
public final class GlobalProperties extends java.lang.ObjectAccess to underlying global property service provided by the current environment
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlobalProperties.KeysGlobal property keys
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tget(GlobalProperties.Keys key)Get a value from the blackboard and duck-type it to the specified typestatic <T> Tget(GlobalProperties.Keys key, T defaultValue)Get the value from the blackboard but return defaultValue if the specified key is not set.static java.lang.StringgetString(GlobalProperties.Keys key, java.lang.String defaultValue)Get a string from the blackboard, returns default value if not set or null.static voidput(GlobalProperties.Keys key, java.lang.Object value)Put the specified value onto the blackboard
-
-
-
Method Detail
-
get
public static <T> T get(GlobalProperties.Keys key)
Get a value from the blackboard and duck-type it to the specified type- Type Parameters:
T- duck type- Parameters:
key- blackboard key- Returns:
- value
-
put
public static void put(GlobalProperties.Keys key, java.lang.Object value)
Put the specified value onto the blackboard- Parameters:
key- blackboard keyvalue- new value
-
get
public static <T> T get(GlobalProperties.Keys key, T defaultValue)
Get the value from the blackboard but return defaultValue if the specified key is not set.- Type Parameters:
T- duck type- Parameters:
key- blackboard keydefaultValue- value to return if the key is not set or is null- Returns:
- value from blackboard or default value
-
getString
public static java.lang.String getString(GlobalProperties.Keys key, java.lang.String defaultValue)
Get a string from the blackboard, returns default value if not set or null.- Parameters:
key- blackboard keydefaultValue- default value to return if the specified key is not set or is null- Returns:
- value from blackboard or default
-
-