Check if MethodDeclaration similar to an IMethod
问题 Is there any way by which i can compare a MethodDeclaration object and IMethod object and check whether they are similar? Or is there any way by whcih a MethodDeclaration object can be converted to an IMethod object (IMethod provides a isSimilar function)? Update : Similarily i would like to know if a FieldDeclaration can be converted to a IField. 回答1: MethodDeclaration is an ASTNode, and IMethod is a JavaElement. The definitive way to check if these two objects correspond to the same method