Package kr.motd.maven.os
Class Detector.SimpleSystemPropertyOperations
java.lang.Object
kr.motd.maven.os.Detector.SimpleSystemPropertyOperations
- All Implemented Interfaces:
SystemPropertyOperationProvider
- Enclosing class:
Detector
private static class Detector.SimpleSystemPropertyOperations
extends Object
implements SystemPropertyOperationProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSystemProperty
(String name) Gets the system property indicated by the specified name.getSystemProperty
(String name, String def) Gets the system property indicated by the specified name.setSystemProperty
(String name, String value) Sets the system property indicated by the specified name.
-
Constructor Details
-
SimpleSystemPropertyOperations
private SimpleSystemPropertyOperations()
-
-
Method Details
-
getSystemProperty
Description copied from interface:SystemPropertyOperationProvider
Gets the system property indicated by the specified name.- Specified by:
getSystemProperty
in interfaceSystemPropertyOperationProvider
- Parameters:
name
- the name of the system property.- Returns:
- the string value of the system property, or
null
if there is no property with that key.
-
getSystemProperty
Description copied from interface:SystemPropertyOperationProvider
Gets the system property indicated by the specified name.- Specified by:
getSystemProperty
in interfaceSystemPropertyOperationProvider
- Parameters:
name
- the name of the system property.def
- a default value.- Returns:
- the string value of the system property, or the default value if there is no property with that key.
-
setSystemProperty
Description copied from interface:SystemPropertyOperationProvider
Sets the system property indicated by the specified name.- Specified by:
setSystemProperty
in interfaceSystemPropertyOperationProvider
- Parameters:
name
- the name of the system property.value
- the value of the system property.- Returns:
- the previous value of the system property, or
null
if it did not have one.
-