Class GenericsClassHelper


  • public class GenericsClassHelper
    extends java.lang.Object
    Utility class for Generic class hierarchy.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.Class getClassOfType​(java.lang.reflect.Type type)  
      static java.lang.reflect.Type[] getParameterizedTypeArguments​(java.lang.Class concrete, java.lang.Class classOrIface)
      Get the parameterized type arguments for a declaring class that declares a generic class or interface type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GenericsClassHelper

        public GenericsClassHelper()
    • Method Detail

      • getParameterizedTypeArguments

        public static java.lang.reflect.Type[] getParameterizedTypeArguments​(java.lang.Class concrete,
                                                                             java.lang.Class classOrIface)
        Get the parameterized type arguments for a declaring class that declares a generic class or interface type.
        Parameters:
        concrete - the concrete class than directly or indirectly implements or extends an interface class.
        classOrIface - the interface or class.
        Returns:
        the parameterized type arguments, or null if the generic interface type is not a parameterized type.
      • getClassOfType

        protected static java.lang.Class getClassOfType​(java.lang.reflect.Type type)