@Nonnull
	public static List<AccessFlag> sort(@Nonnull Type type,
										@Nonnull Collection<AccessFlag> flags) {
		List<AccessFlag> list;
		if (flags instanceof ArrayList<AccessFlag>) {
			list = (List<AccessFlag>) flags;
		} else {
			list = new ArrayList<>(flags);
		}
		list.sort(type.recommendOrderComparator);
		return list;
	}
@param type
		Flag type.
@param flags
		Collection of flags.

@return Sorted order of flags.
recaf-core/src/main/java/software/coley/recaf/util/AccessFlag.java