Class MainResult<T>


  • public final class MainResult<T>
    extends Object
    Class that allows to return result and expected exit code from ninja execution.

    It's not a record for now because of the need to support Java 11.

    • Field Detail

      • DEFAULT_EXIT_CODE_ERROR

        public static final int DEFAULT_EXIT_CODE_ERROR
        See Also:
        Constant Field Values
      • DEFAULT_EXIT_CODE_SUCCESS

        public static final int DEFAULT_EXIT_CODE_SUCCESS
        See Also:
        Constant Field Values
      • EMPTY_ERROR

        public static final MainResult<?> EMPTY_ERROR
      • EMPTY_SUCCESS

        public static final MainResult<?> EMPTY_SUCCESS
    • Constructor Detail

      • MainResult

        public MainResult​(T result)
      • MainResult

        public MainResult​(T result,
                          int exitCode)
      • MainResult

        public MainResult​(T result,
                          int exitCode,
                          String exitMessage)
    • Method Detail

      • result

        public T result()
      • exitCode

        public int exitCode()
      • exitMessage

        public String exitMessage()