@@ -0,0 +1,850 @@
+package fr.phan.damapping.processor.model.util;%0A%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Set;%0Aimport com.google.common.collect.ImmutableList;%0Aimport com.google.common.collect.ImmutableSet;%0A%0A/**%0A * ImmutabilityHelper -%0A *%0A * @author S%C3%A9bastien Lesaint%0A */%0Apublic final class ImmutabilityHelper %7B%0A  private ImmutabilityHelper() %7B%0A    // prevents intantiation%0A  %7D%0A%0A  public static %3CT%3E Set%3CT%3E nonNullFrom(Set%3CT%3E set) %7B%0A    if (set == null) %7B%0A      return Collections.emptySet();%0A    %7D%0A    if (set instanceof ImmutableSet) %7B%0A      return set;%0A    %7D%0A    return ImmutableSet.copyOf(set);%0A  %7D%0A%0A  public static %3CT%3E List%3CT%3E nonNullFrom(List%3CT%3E list) %7B%0A    if (list == null) %7B%0A      return Collections.emptyList();%0A    %7D%0A    if (list instanceof ImmutableList) %7B%0A      return list;%0A    %7D%0A    return ImmutableList.copyOf(list);%0A  %7D%0A%7D%0A

add class ImmutabilityHelper with utility methods to reduce verbose immutability code