javaparser / javasymbolsolver

*old repository* --> this is now integrated in https://github.com/javaparser/javaparser
Apache License 2.0
290 stars 76 forks source link

Fix issues #300 and #355: Getting the FieldDeclaration from a FieldAccessExpr #357

Closed mcesar closed 6 years ago

mcesar commented 6 years ago

Fix issues #300 and #355.

The logic to get the ResolvedReferenceTypeDeclaration's from a scope and a TypeSolver was extracted from MethodCallExprContext.solveMethod to a method named findTypeDeclarations and pulled up to AbstractJavaParserContext class. After that a method called FieldAccessContext.solveField was created. This method uses the findTypeDeclarations method mentioned before.