Class SystemProxySystemImpl

java.lang.Object
me.julb.sdk.github.actions.kit.SystemProxySystemImpl
All Implemented Interfaces:
SystemProxy

class SystemProxySystemImpl extends Object implements SystemProxy
The class using System functions to implement SystemProxy.
Among these functions, there all helpers to get env variables, print messages to STDOUT and exit the program.
Author:
Julb.
  • Constructor Details

    • SystemProxySystemImpl

      SystemProxySystemImpl()
  • Method Details

    • exit

      public void exit(int status)
      Exits the program with the given code.
      Specified by:
      exit in interface SystemProxy
      Parameters:
      status - the status code.
    • println

      public void println()
      Prints a line feed on STDOUT.
      Specified by:
      println in interface SystemProxy
    • println

      public <T> void println(T name)
      Prints a message on STDOUT.
      Specified by:
      println in interface SystemProxy
      Type Parameters:
      T - the message object type.
      Parameters:
      name - the message to print.
    • getenv

      public String getenv(String name)
      Gets the value of the given environment variable name.
      Specified by:
      getenv in interface SystemProxy
      Parameters:
      name - the name of the environment variable.
      Returns:
      the value of the environment variable, or null if not exists.