Replacing add method with classmethod in contact.mechanism #3725

Review ID - 2323002