Class TypeMismatchException

All Implemented Interfaces:
Serializable

public class TypeMismatchException extends DependencyException
Exception thrown when attempting to register an instance with a type that is not assignable from the instance's actual class.

This occurs when trying to register an instance with an incompatible explicit type parameter.

See Also:
  • Constructor Details

    • TypeMismatchException

      public TypeMismatchException(@NotNull @NotNull Class<?> expected, @NotNull @NotNull Class<?> actual)
      Creates a new type mismatch exception with details about the expected and actual types.
      Parameters:
      expected - The expected type (what was specified in register)
      actual - The actual type of the instance