JinyongPark / javaparser

Automatically exported from code.google.com/p/javaparser
0 stars 0 forks source link

javaparser cannot distinguish long qualified name and long field access expressions. #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to conduct some static analysis on top of javaparser, and find out 
that javaparser cannot distinguish long qualified name and long field access 
expressions.
 for example,
 for two expressions,

 Pa.Pb.Pc.D.fun();  //where Pa,Pb and Pc are package names, D is a class name 

 a.b.c.fun();//where a,b,c are variable names.

javaparser recognizes these two expressions' prefixes(Pa.Pb.Pc.D and a.b.c.) as 
field access expressions. When I get the semantic tree, I cannot make sure 
whether fun() is invoked on an object or just a static method from some class. 
I am wondering maybe this issue arises because the fact javaparser does not 
analysis symbols in a code snippet, so that it cannot distinguish package names 
from variable names?

  thank you for reading!

Original issue reported on code.google.com by kongying...@gmail.com on 26 Aug 2010 at 8:53