1. From the command line:
java -jar javaloader.jar <classpath> -tf <targetFolder> -u <SQLServer username> -p <SQLServer password>
<classpath> is a series of paths delimited by ';'. Each path can point to either a directory, a .class file or a .jar file.
The model constructed from <classpath> will be treated as a single "unit" and foreign keys to the Classes, Types, Methods and Fields table will be shared. This is arguable not the ideal behavior and will likely change once I decide what should constitute a module.

2. You can now run a query in SQLServer to conduct an analysis of your code. For example, to get a list of method invocations with the caller and callee class and method:
use Repository;
select [CallerClass].[InternalName] as [CallerClass], 
	   [Caller].[Name] as [Caller],
	   [CalleeClass].[InternalName] as [CalleeClass],
	   [Callee].[Name] as [Callee]
from [Java.Class].[MethodInvocations] as [Invocation]
	inner join [Java.Class].[Methods] as [Caller] on [Caller].[Id] = [Invocation].[Caller]
	inner join [Java.Class].[Classes] as [CallerClass] on [CallerClass].[Id] = [Caller].[Class]
	inner join [Java.Class].[Methods] as [Callee] on [Callee].[Id] = [Invocation].[Callee]
	inner join [Java.Class].[Classes] as [CalleeClass] on [CalleeClass].[Id] = [Callee].[Class]
	inner join [Repository.Item].[Folders] as [Folder] on [Folder].[Id] = [Invocation].[Folder]
where [Folder].[Name] = 'MyFolder'

Last edited Sep 7, 2010 at 3:37 AM by TristanStCyr, version 3


No comments yet.