class MoreClasses {

	public static Set<Class> getInheritedClasses(Class clazz) {
		Set<Class> inheritedClasses = Sets.newHashSet();

		// add super class, and add recursively their inherited classes
		Class superClass = clazz.getSuperclass();
		if (superClass != null) {
			inheritedClasses.add(superClass);
			inheritedClasses.addAll(getInheritedClasses(superClass));
		}

		// add all interfaces, and recursively add their inherited classes
		Class[] interfaces = clazz.getInterfaces();
		for (Class anInterface : interfaces) {
			inheritedClasses.add(anInterface);
			inheritedClasses.addAll(getInheritedClasses(anInterface));
		}

		return inheritedClasses;
	}

	private  MoreClasses();

}