private void collectTypeHierarchy(Set<Class<?>> typeHierarchy, Class<?> type) {
			if (type != null && !IGNORED_CLASSES.contains(type)) {
				if (typeHierarchy.add(type)) {
					Class<?> superclass = type.getSuperclass();
					if (type.isArray()) {
						superclass = primitiveTypeToWrapperMap.get(superclass);
					}
					collectTypeHierarchy(typeHierarchy, createRelated(type, superclass));

					for (Class<?> implementsInterface : type.getInterfaces()) {
						collectTypeHierarchy(typeHierarchy, createRelated(type, implementsInterface));
					}
				}
			}
		}