Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] APIs &/OR Source related to lexical analysis & parsing of Java Code



Viraj,

You might want to have a look at the DOM AST API. The main entry point is
org.eclipse.jdt.core.dom.ASTParser#createAST(IProgressMonitor). This will
create an abstract syntax tree on the source that you set (see the
setSource(...) methods). You can then visit this tree to get to your
statement (see ASTNote#accept(ASTVisitor).)

As for "retracing the arguments", I didn't understand what you meant. If
you want to search for references to a type, you can use the
org.eclipse.jdt.core.search.SearchEngine API.

Jerome



                                                                           
             Viraj                                                         
             Paripatyadar                                                  
             <viraj.paripatyad                                          To 
             ar@xxxxxxxxx>             jdt-core-dev@xxxxxxxxxxx            
             Sent by:                                                   cc 
             jdt-core-dev-admi                                             
             n@xxxxxxxxxxx                                         Subject 
                                       [jdt-core-dev] APIs &/OR Source     
                                       related to lexical analysis &       
             12/16/2004 08:57          parsing of Java Code                
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
               jdt-core-dev                                                
                                                                           
                                                                           




Hi,

I am a coumputer science student pursuing an MTech project in scanning
code for potential security vulnerabilities. This I will do mostly in
Java &/Or C-C++.

I am looking for a way to reach particular staments (e.g. calls to
methods like system.execute() ) in Java code, and then retracing the
arguments passed there to their previous uses(much like in type or call
hierarchies). Could anyone suggest any API or part of source that I
should look at? I would be much obliged.

Regards,
Viraj Paripatyadar
_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-core-dev




Back to the top