November 20, 2008, 09:01:11 am *
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Identify Imports within a Class  (Read 2465 times)
bwburch
Newbie
*
Posts: 4


« on: August 29, 2007, 04:59:28 pm »

How could I write a query to retrieve class imports.  Example if I want to find all java.sql.Date imports and have the query return all class with the imports.
Logged
Mathieu Verbaere
Administrator
Newbie
*****
Posts: 26


« Reply #1 on: August 30, 2007, 11:38:02 am »

We do not store that information in the database yet, but we will add it very soon. Thank you for your interest.
Logged
elnar
Administrator
Newbie
*****
Posts: 17


« Reply #2 on: September 30, 2007, 10:11:37 pm »

You can query imports using the new release of the SemmleCode plugin. For instance, to find all compilation units that import java.sql.Date type you can try the following query:

Code:
from ImportType t
where t.getImportedType().hasQualifiedName("java.sql","Date")
select t.getCompilationUnit(), t
Logged
Pages: [1]
  Print  
 
Jump to: