Class ChameleonReflectiveException

    • 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.
      • ChameleonReflectiveException

        protected ChameleonReflectiveException​(String message,
                                               Throwable cause,
                                               boolean enableSuppression,
                                               boolean writableStackTrace)
    • 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.