Class SystemPropertiesVar


public class SystemPropertiesVar extends MapVar
System property variable resolver.

The format for this var is "$S{systemProperty[,defaultValue]}"

Example:

// Create a variable resolver that resolves system properties (e.g. "$S{java.home}") VarResolver varResolver = VarResolver.create().vars(SystemPropertiesVar.class).build(); // Use it! System.out.println(varResolver.resolve("java.home is set to $S{java.home}"));

Since this is a SimpleVar, any variables contained in the result will be recursively resolved.
Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.

See Also: