KickJava   Java API By Example, From Geeks To Geeks.

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


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
24 /**
25  * Specify the location of a codebase.
26  *
27  * @author David Hovemeyer
28  */

29 public interface ICodeBaseLocator {
30     /**
31      * Get the codebase object.
32      *
33      * @return the codebase object
34      */

35     public ICodeBase openCodeBase() throws IOException JavaDoc, ResourceNotFoundException;
36     
37     /**
38      * Get the codebase locator describing the location of
39      * a relative codebase. This method is useful for getting the
40      * location of a codebase referred to in the Class-Path attribute
41      * of a Jar manifest.
42      *
43      * @param relativePath the path of a relative codebase
44      * @return codebase locator of the relative codebase whose path is given
45      */

46     public ICodeBaseLocator createRelativeCodeBaseLocator(String JavaDoc relativePath);
47     
48     /**
49      * Convert the codebase locator to a string representation.
50      * If possible two codebase locators that refer to the same codebase
51      * should produce the same string representation.
52      * So, this string can serve as a key identifying the codebase
53      * in a map.
54      *
55      * @return a string representation of the codebase
56      */

57     public String JavaDoc toString();
58 }
59
Popular Tags