Class JavaUtils

java.lang.Object
com.ldtteam.structurize.util.JavaUtils

public class JavaUtils extends Object
  • Method Details

    • commonSuperClass

      public static List<Class<?>> commonSuperClass(boolean superClasses, boolean interfaces, Class<?>... classes)
      Returns:
      linked list of common interfaces and super classes among given classes in order as found from classes[0]
    • getFirstCommonSuperClass

      public static Class<?> getFirstCommonSuperClass(Class<?>... classes)
      Returns:
      first common super class or Object.class
    • deleteDirectory

      public static boolean deleteDirectory(Path path)
      Delete directory and all files and directories in it.
      Parameters:
      path - the path of the file to delete.
      Returns:
      true if successful.