KickJava   Java API By Example, From Geeks To Geeks.

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


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 import java.io.IOException JavaDoc;
23 import java.io.InputStream JavaDoc;
24 import java.util.NoSuchElementException JavaDoc;
25
26 /**
27  * Iterator over the resources in an IScannableCodeBase.
28  * Note that some of the methods can throw InterruptedException.
29  * This occurs when the analysis is canceled by interrupting
30  * the analysis thread.
31  *
32  * <p>
33  * Note that the close() method must be called when done with
34  * an ICodeBaseIterator object.
35  * </p>
36  *
37  * @author David Hovemeyer
38  */

39 public interface ICodeBaseIterator {
40     /**
41      * Return true if there is another resource to be scanned,
42      * false otherwise.
43      *
44      * @return true if there is another resource to be scanned,
45      * false otherwise
46      */

47     public boolean hasNext() throws InterruptedException JavaDoc;
48     
49     /**
50      * Get the ICodeBaseEntry representing the next resource in the code base.
51      *
52      * @return the ICodeBaseEntry representing the next resource in the code base
53      * @throws InterruptedException
54      */

55     public ICodeBaseEntry next() throws InterruptedException JavaDoc;
56 }
57
Popular Tags