java.lang.Object
java.lang.Record
dev.nipafx.args.ArgsMessage.FailedConstruction
- Record Components:
exception- the exception thrown by the args record constructor
- All Implemented Interfaces:
ArgsMessage,ArgsMessage.ArgsErrorMessage
- Enclosing interface:
ArgsMessage
public static record ArgsMessage.FailedConstruction(Throwable exception)
extends Record
implements ArgsMessage.ArgsErrorMessage
Indicates that an args record constructor threw an exception.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.nipafx.args.ArgsMessage
ArgsMessage.ArgsErrorMessage, ArgsMessage.ArgsWarningMessage, ArgsMessage.FailedConstruction, ArgsMessage.IllegalModeValue, ArgsMessage.IllegalValue, ArgsMessage.MissingAction, ArgsMessage.MissingArgument, ArgsMessage.MissingValue, ArgsMessage.UnexpectedValue, ArgsMessage.UnknownAction, ArgsMessage.UnknownArgument -
Constructor Summary
ConstructorsConstructorDescriptionFailedConstruction(Throwable exception) Creates a message indicating that an args record constructor threw an exception. -
Method Summary
Modifier and TypeMethodDescriptioncause()If the warning/error was caused by an exception, it is returned.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexceptionrecord component.final inthashCode()Returns a hash code value for this object.Returns a textual description of the warning/error that can be shown to the user.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FailedConstruction
Creates a message indicating that an args record constructor threw an exception.- Parameters:
exception- the exception thrown by the args record constructor
-
-
Method Details
-
toMessage
Description copied from interface:ArgsMessageReturns a textual description of the warning/error that can be shown to the user.- Specified by:
toMessagein interfaceArgsMessage- Returns:
- a textual description of the warning/error
-
cause
Description copied from interface:ArgsMessageIf the warning/error was caused by an exception, it is returned.- Specified by:
causein interfaceArgsMessage- Returns:
- the cause of the warning/error
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
exception
Returns the value of theexceptionrecord component.- Returns:
- the value of the
exceptionrecord component
-