org.hyphenType.exit
Class ExitStatusHelper

java.lang.Object
  extended by org.hyphenType.exit.ExitStatusHelper

public class ExitStatusHelper
extends Object

The object that is passed to the StatusCode.beforeExit(ExitStatusHelper) method.

Author:
akira

Constructor Summary
ExitStatusHelper(Class<? extends Options<?>> optionsInterface, Enum<? extends StatusCode> enumConstant, Throwable throwable, Object... args)
          Creates a helper containing the message extracted from the documentation formatter.
 
Method Summary
 String getMessage()
          Gives access to the message associated with this exit status code.
 Throwable getThrowable()
          Gives access to the throwable responsible for this environment termination.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExitStatusHelper

public ExitStatusHelper(Class<? extends Options<?>> optionsInterface,
                        Enum<? extends StatusCode> enumConstant,
                        Throwable throwable,
                        Object... args)
Creates a helper containing the message extracted from the documentation formatter.

Parameters:
optionsInterface - The options interface parsed using the command line arguments.
enumConstant - The enum constant used as the basis for creating the key.
throwable - The throwable that was responsible for this termination, if any.
args - Replacements.
Method Detail

getMessage

public final String getMessage()
Gives access to the message associated with this exit status code. At this point, the message was already formatted according with the arguments given in the constructor of this class: ExitStatusHelper#ExitStatusHelper(String, Object...). In other words, status code enumeration constants cannot access the raw content of the resource bundles.

Returns:
The message associated to this exit status code.

getThrowable

public final Throwable getThrowable()
Gives access to the throwable responsible for this environment termination. Typically, an environment can be for instance a JVM.

Returns:
The throwable, if any.


Copyright © 2013. All Rights Reserved.