Class TypeParseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ultikits.ultitools.abstracts.command.parser.TypeParseException
- All Implemented Interfaces:
Serializable
Exception thrown when type parsing fails.
- Since:
- 6.2.0
- Version:
- 2.0.0
- Author:
- wisdomme
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTypeParseException(String message) Constructs a new TypeParseException with just a message.TypeParseException(String inputValue, Class<?> targetType, String message) Constructs a new TypeParseException.TypeParseException(String inputValue, Class<?> targetType, String message, Throwable cause) Constructs a new TypeParseException with a cause.TypeParseException(String message, Throwable cause) Constructs a new TypeParseException with a message and cause. -
Method Summary
Modifier and TypeMethodDescriptionGets the input value that failed to parse.Class<?> Gets the target type that was expected.static TypeParseExceptioninvalidFormat(String value, Class<?> targetType) Creates a TypeParseException for an invalid format.static TypeParseExceptionCreates a TypeParseException for a null value.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
inputValue
-
targetType
-
-
Constructor Details
-
TypeParseException
Constructs a new TypeParseException with just a message.- Parameters:
message- the detail message
-
TypeParseException
Constructs a new TypeParseException with a message and cause.- Parameters:
message- the detail messagecause- the cause of the exception
-
TypeParseException
Constructs a new TypeParseException.- Parameters:
inputValue- the input value that failed to parsetargetType- the target type that was expectedmessage- the detail message
-
TypeParseException
Constructs a new TypeParseException with a cause.- Parameters:
inputValue- the input value that failed to parsetargetType- the target type that was expectedmessage- the detail messagecause- the cause of the exception
-
-
Method Details
-
getInputValue
Gets the input value that failed to parse.- Returns:
- the input value
-
getTargetType
Gets the target type that was expected.- Returns:
- the target type
-
invalidFormat
Creates a TypeParseException for an invalid format.- Parameters:
value- the invalid valuetargetType- the expected type- Returns:
- a new TypeParseException
-
nullValue
Creates a TypeParseException for a null value.- Parameters:
targetType- the expected type- Returns:
- a new TypeParseException
-