java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

Stack Overflow | madx | 10 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Java ClassCastException taking ParameterizedType E from generic instance "new ClazzXXX<E>()"

    Stack Overflow | 10 months ago | madx
    java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

      at org.command4j.core.commands.utils.Home.getTypeParameterClass()
    2. org.command4j.core
      Home.main
      1. org.command4j.core.commands.utils.Home.getTypeParameterClass(Home.java:13)
      2. org.command4j.core.commands.utils.Home.mainKO(Home.java:46)
      3. org.command4j.core.commands.utils.Home.main(Home.java:26)
      3 frames