Class ClassUtils

java.lang.Object
io.github.syst3ms.skriptparser.util.ClassUtils

public class ClassUtils extends Object
Utility functions for Class objects
  • Constructor Details

    • ClassUtils

      public ClassUtils()
  • Method Details

    • getCommonSuperclass

      public static Class<?> getCommonSuperclass(Class<?>... cs)
      Parameters:
      cs - the array of classes
      Returns:
      the nearest common superclass of the provided classes, accounting for interfaces
    • getCommonSuperclass

      public static Class<?> getCommonSuperclass(boolean interfaces, Class<?>... cs)
      Parameters:
      interfaces - whether or not to account for interfaces
      cs - the array of classes
      Returns:
      the nearest common superclass of the provided classes