The citation assumes the synchronization of every call to the class method on the same object instance. For example, consider the following class:
public class Test { private Set<String> set = new TreeSet<>(); public void add(String s) { set.add(s); } }
While it's not thread-safe, you can safely call the add method this way:
public void safeAdd(Test t, String s) { synchronized(t) { t.add(s); } }
If safeAdd is called from multiple threads with the same t, they will be mutually exclusive. If the different t is used, it's also fine as independent objects are updated.
However consider that we declare the set as static:
private static Set<String> set = new TreeSet<>();
This way even different Test objects access the shared collection. So in this case the synchronization on Test instances will not help as the same set may still be modified concurrently from different Test instances which may result in data loss, random exception, infinite loop or whatever. So such class would be thread-hostile.