Class ChameleonReflectiveException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- dev.hypera.chameleon.exception.ChameleonRuntimeException
-
- dev.hypera.chameleon.exception.reflection.ChameleonReflectiveException
-
- All Implemented Interfaces:
Serializable
public class ChameleonReflectiveException extends ChameleonRuntimeException
Chameleon reflective exception.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description ChameleonReflectiveException()Chameleon reflective exception constructor.ChameleonReflectiveException(String message)Chameleon reflective exception constructor.ChameleonReflectiveException(String message, Throwable cause)Chameleon reflective exception constructor.protectedChameleonReflectiveException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)ChameleonReflectiveException(Throwable cause)Chameleon reflective exception constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull ChameleonReflectiveExceptioncreate(@NotNull String s, @NotNull Throwable ex, @NotNull Object... args)Create a new Chameleon reflective exception with a template and exception.static @NotNull ChameleonReflectiveExceptioncreateMethodInvocationFailure(@NotNull Method method, @NotNull Object obj, @NotNull Throwable ex)Create a failed to call method exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ChameleonReflectiveException
public ChameleonReflectiveException()
Chameleon reflective exception constructor.
-
ChameleonReflectiveException
public ChameleonReflectiveException(String message)
Chameleon reflective exception constructor.- Parameters:
message- Exception message.
-
ChameleonReflectiveException
public ChameleonReflectiveException(String message, Throwable cause)
Chameleon reflective exception constructor.- Parameters:
message- Exception message.cause- Exception cause.
-
ChameleonReflectiveException
public ChameleonReflectiveException(Throwable cause)
Chameleon reflective exception constructor.- Parameters:
cause- Exception cause.
-
-
Method Detail
-
create
@NotNull public static @NotNull ChameleonReflectiveException create(@NotNull @NotNull String s, @NotNull @NotNull Throwable ex, @NotNull @NotNull Object... args)
Create a new Chameleon reflective exception with a template and exception.- Parameters:
s- Template string.ex- Exception.args- Template arguments.- Returns:
- new Chameleon reflective exception.
-
createMethodInvocationFailure
@Contract(value="_, _, _ -> new", pure=true) @NotNull public static @NotNull ChameleonReflectiveException createMethodInvocationFailure(@NotNull @NotNull Method method, @NotNull @NotNull Object obj, @NotNull @NotNull Throwable ex)Create a failed to call method exception.Example message:
Failed to invoke method get(String) on dev.hypera.chameleon.Example- Parameters:
method- Method.obj- Object method was called on.ex- Exception thrown.- Returns:
- new exception.
-
-