Class Visitors


  • public final class Visitors
    extends Object
    • Method Detail

      • newVisitor

        public static <T> Visitor<T> newVisitor​(Class<T> type,
                                                Visitor<T> visitor)
      • getTypeArguments

        protected static <T> List<Class> getTypeArguments​(Class<T> baseClass,
                                                          Class<? extends T> childClass)
        Get the actual type arguments a child class has used to extend a generic base class.
        Type Parameters:
        T - the type of the baseClass
        Parameters:
        baseClass - the base class
        childClass - the child class
        Returns:
        a list of the raw classes for the actual type arguments.