Class LaunchSysProp<T>

java.lang.Object
com.inductiveautomation.ignition.client.launch.util.LaunchSysProp<T>
Direct Known Subclasses:
LaunchSysProp.BooleanLaunchSysProp, LaunchSysProp.IntLaunchSysProp, LaunchSysProp.LaunchSysPropWithJvm, LaunchSysProp.LongLaunchSysProp, LaunchSysProp.SequenceLaunchSysProp, LaunchSysProp.StringLaunchSysProp

public abstract class LaunchSysProp<T> extends Object
A System Property reference which has its value set at instantiation. This value is typically supplied via the System.getProperty(String) function, taking into account any legacyKey values as backup
  • Field Details

    • key

      protected final String key
    • value

      protected final T value
    • legacyKey

      protected final String legacyKey
  • Method Details

    • key

      @Nonnull public String key()
    • value

      @Nullable public T value()
      Returns the value assigned at instantiation. May be null
    • valueOr

      @Nonnull public T valueOr(@Nonnull T defaultValue)
      Returns the value assigned at instantiation or the defaultValue supplied
    • toDProps

      @Nonnull public Set<String> toDProps()
      Returns a set of CLI arguments in the form of -D${key}=${value}, unless the value is null, then an empty Set is returned
    • toDPropsWith

      @Nonnull public Set<String> toDPropsWith(@Nullable T value)
      Returns a set of CLI arguments in the form of -D${key}=${value}, unless the value is null, then an empty Set is returned. The value which is provided is the value which is always returned. This is a convenience method for returning the correct CLI arguments, but where a new value is required, like on retargets etc