Diff (final Proto past) { final MethodRepr m = (MethodRepr)past; final Difference diff = super.difference(past); final Difference.Specifier<TypeRepr.ClassType, Difference> excs = Difference.make(m.myExceptions, myExceptions); final Difference.Specifier<ParamAnnotation, Difference> paramAnnotations = Difference.make(m.myParameterAnnotations, myParameterAnnotations); final int base = paramAnnotations.unchanged()? diff.base() : diff.base() | Difference.ANNOTATIONS; return new Diff(diff) { @Override public Specifier<ParamAnnotation, Difference> parameterAnnotations() { return paramAnnotations; } @Override public boolean no() { return base() == NONE && !defaultAdded() && !defaultRemoved() && excs.unchanged() && paramAnnotations.unchanged(); } @Override public boolean defaultAdded() { return hasValue() && !m.hasValue(); } @Override public boolean defaultRemoved() { return !hasValue() && m.hasValue(); } @Override public Specifier<TypeRepr.ClassType, Difference> exceptions() { return excs; } @Override public int base() { return base; } @Override public boolean hadValue() { return m.hasValue(); } }; }