Class SystemPropertyUtil
java.lang.Object
io.netty.util.internal.SystemPropertyUtil
public final class SystemPropertyUtil
extends java.lang.Object
A collection of utility methods to retrieve and parse the values of the Java system properties.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontains(java.lang.String key) Returnstrueif and only if the system property with the specifiedkeyexists.static java.lang.Stringget(java.lang.String key) Returns the value of the Java system property with the specifiedkey, while falling back tonullif the property access fails.static java.lang.Stringget(java.lang.String key, java.lang.String def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.static booleangetBoolean(java.lang.String key, boolean def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.static intgetInt(java.lang.String key, int def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.static longgetLong(java.lang.String key, long def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
logger
-
-
Constructor Details
-
SystemPropertyUtil
private SystemPropertyUtil()
-
-
Method Details
-
contains
public static boolean contains(java.lang.String key) Returnstrueif and only if the system property with the specifiedkeyexists. -
get
public static java.lang.String get(java.lang.String key) Returns the value of the Java system property with the specifiedkey, while falling back tonullif the property access fails.- Returns:
- the property value or
null
-
get
public static java.lang.String get(java.lang.String key, java.lang.String def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.- Returns:
- the property value.
defif there's no such property or if an access to the specified property is not allowed.
-
getBoolean
public static boolean getBoolean(java.lang.String key, boolean def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.- Returns:
- the property value.
defif there's no such property or if an access to the specified property is not allowed.
-
getInt
public static int getInt(java.lang.String key, int def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.- Returns:
- the property value.
defif there's no such property or if an access to the specified property is not allowed.
-
getLong
public static long getLong(java.lang.String key, long def) Returns the value of the Java system property with the specifiedkey, while falling back to the specified default value if the property access fails.- Returns:
- the property value.
defif there's no such property or if an access to the specified property is not allowed.
-