001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package gov.nist.secauto.metaschema.cli.processor;
007
008import edu.umd.cs.findbugs.annotations.NonNull;
009
010/**
011 * An {@link ExitStatus} implementation that represents a status without an
012 * associated message.
013 * <p>
014 * This implementation is useful when only the exit code needs to be
015 * communicated, without additional context or explanation.
016 */
017public class NonMessageExitStatus
018    extends AbstractExitStatus {
019
020  /**
021   * Construct a new exit status without an associated message.
022   *
023   * @param code
024   *          the non-null exit code representing the status
025   */
026  NonMessageExitStatus(@NonNull ExitCode code) {
027    super(code);
028  }
029
030  /**
031   * {@inheritDoc}
032   *
033   * @return {@code null} as this implementation does not support messages
034   */
035  @Override
036  protected String getMessage() {
037    return null;
038  }
039}