Package org.spongepowered.asm.launch
Class GlobalProperties
java.lang.Object
org.spongepowered.asm.launch.GlobalProperties
public final class GlobalProperties
extends java.lang.Object
Access 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
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 blackboardMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
get
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
Put the specified value onto the blackboard- Parameters:
key- blackboard keyvalue- new value
-
get
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
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
-