KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jode > decompiler > Scope


1 /* Scope Copyright (C) 1998-2002 Jochen Hoenicke.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU Lesser General Public License as published by
5  * the Free Software Foundation; either version 2, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program; see the file COPYING.LESSER. If not, write to
15  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
16  *
17  * $Id: Scope.java,v 1.4.4.1 2002/05/28 17:34:03 hoenicke Exp $
18  */

19
20 package jode.decompiler;
21
22 /**
23  * This interface describes a scope. The basic scopes are: the package
24  * scope, the class scope (one more for each inner class) and the method
25  * scope.
26  *
27  * @author Jochen Hoenicke
28  */

29 public interface Scope {
30     public final int PACKAGENAME = 0;
31     public final int CLASSNAME = 1;
32     public final int METHODNAME = 2;
33     public final int FIELDNAME = 3;
34     public final int AMBIGUOUSNAME = 4;
35     public final int LOCALNAME = 5;
36
37     public final int NOSUPERMETHODNAME = 12;
38     public final int NOSUPERFIELDNAME = 13;
39
40     public final int CLASSSCOPE = 1;
41     public final int METHODSCOPE = 2;
42
43     /**
44      * Simplifies the given name.
45      * @param name the name to simplify.
46      * @param usageType the context of this name.
47      * @return null if the name hasn't a simplification in current
48      * scope, the simplified name otherwise.
49      */

50     /**
51      * Tells if this is the scope of name
52      */

53     public boolean isScopeOf(Object JavaDoc object, int scopeType);
54     public boolean conflicts(String JavaDoc name, int usageType);
55 }
56
Popular Tags