KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > classfile > IAnalysisEngine


1 /*
2  * FindBugs - Find Bugs in Java programs
3  * Copyright (C) 2006, University of Maryland
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19
20 package edu.umd.cs.findbugs.classfile;
21
22 /**
23  * An engine for analyzing classes or methods.
24  *
25  * @author David Hovemeyer
26  */

27 public interface IAnalysisEngine<DescriptorType> {
28     /**
29      * Perform an analysis on class or method named by given descriptor.
30      *
31      * @param analysisCache the analysis cache
32      * @param descriptor the descriptor of the class or method to be analyzed
33      * @return the result of the analysis of the class or method
34      */

35     public Object JavaDoc analyze(IAnalysisCache analysisCache, DescriptorType descriptor)
36         throws CheckedAnalysisException;
37     
38     /**
39      * Register the analysis engine with given analysis cache.
40      *
41      * @param analysisCache the analysis cache
42      */

43     public void registerWith(IAnalysisCache analysisCache);
44
45     /**
46      * Return true if analysis results produced by this
47      * analysis engine should be retained indefinitely.
48      * Unless some correctness criterion prevents analysis results
49      * from being recomputing, analysis engines should
50      * return false (allowing the cache to be kept to a manageable size).
51      *
52      * @return true if analysis results produced by this engine should
53      * be retained indefinitely,
54      * false if they may be recomputed as needed
55      */

56     public boolean retainAnalysisResults();
57 }
58
Popular Tags