Re: [SrcML] static analyzis
Status: Beta
Brought to you by:
crashchaos
From: Frank R. <fra...@in...> - 2005-05-27 23:28:06
|
On Tue, May 24, 2005 at 09:22:16PM +0200, Leif Bladt wrote: > The analyzer plugins can handle more than one SrcML document now. > Therefore I changed the execute method from: > public abstract Vector execute(SrcML f_srcml) throws > PluginException; > to > public abstract Vector execute(Vector f_docs) throws > PluginException; You can change that into public abstract Vector<AnalyzerResult> execute( Vector<SrcML> f_docs) throws PluginException now that we 'support' java 1.5 to increase the type safety. (same for the methods below) > I also changed the Analyzer Platform, but I didn't adopted the way the > View Platform handles this. Instead I will use a Vector with SrcML > documents in it. To manage the Vector there are 4 methods: > public Vector addDocument(SrcML f_srcml) {} > public Vector getDocuments() {} > public void removeAllDocuments() {} > public Vector removeDocument(SrcML f_srcml) {} So if I understand that correctly the AnalyzerPlatform still only has a execute() method without parameters, but implicitly calls the plugin with execute(getDocuments()) ? > The advantage is, that you can add all your files you want to be > analyzed and then run numerous analyzes on it, with just set the new > plugin each time. > > As always, tell me what you think about it! Sounds good. Although you could do the same for the View too. The Vector of SrcML documents has to be created 'somewhere'. In your case the AnalyzerPlatform takes care of it and in the case of the ViewPlatform the callee would have to use the same Vector for every chosen ViewPlugin. But from a design point of view your solution looks better to me as it's emphasizing the platform concept more clearly. -- Raiser, Frank Student @ University of Ulm (www.uni-ulm.de) |