KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > edu > umd > cs > findbugs > classfile > analysis > ClassNameAndSuperclassInfo


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.analysis;
21
22 import edu.umd.cs.findbugs.classfile.ClassDescriptor;
23 import edu.umd.cs.findbugs.classfile.ICodeBaseEntry;
24
25 /**
26  * Represents the class name, superclass name, and interface list
27  * of a class.
28  *
29  * @author David Hovemeyer
30  */

31 public class ClassNameAndSuperclassInfo {
32     private ClassDescriptor classDescriptor;
33     private ClassDescriptor superclassDescriptor;
34     private ClassDescriptor[] interfaceDescriptorList;
35     private ICodeBaseEntry codeBaseEntry;
36     private int accessFlags;
37
38     /**
39      * Constructor.
40      * Does not initialize any fields; setters should be called
41      * before the object is used.
42      */

43     public ClassNameAndSuperclassInfo() {
44     }
45
46     /**
47      * Constructor.
48      *
49      * @param classDescriptor ClassDescriptor representing the class name
50      * @param superclassDescriptor ClassDescriptor representing the superclass name
51      * @param interfaceDescriptorList ClassDescriptors representing implemented interface names
52      * @param codeBaseEntry codebase entry class was loaded from
53      * @param accessFlags class's access flags
54      */

55     public ClassNameAndSuperclassInfo(ClassDescriptor classDescriptor, ClassDescriptor superclassDescriptor, ClassDescriptor[] interfaceDescriptorList, ICodeBaseEntry codeBaseEntry, int accessFlags) {
56         this.classDescriptor = classDescriptor;
57         this.superclassDescriptor = superclassDescriptor;
58         this.interfaceDescriptorList = interfaceDescriptorList;
59         this.codeBaseEntry = codeBaseEntry;
60         this.accessFlags = accessFlags;
61     }
62
63     /**
64      * @return Returns the accessFlags.
65      */

66     public int getAccessFlags() {
67         return accessFlags;
68     }
69
70     /**
71      * @param accessFlags The accessFlags to set.
72      */

73     public void setAccessFlags(int accessFlags) {
74         this.accessFlags = accessFlags;
75     }
76
77     /**
78      * @return Returns the classDescriptor.
79      */

80     public ClassDescriptor getClassDescriptor() {
81         return classDescriptor;
82     }
83
84     /**
85      * @param classDescriptor The classDescriptor to set.
86      */

87     public void setClassDescriptor(ClassDescriptor classDescriptor) {
88         this.classDescriptor = classDescriptor;
89     }
90
91     /**
92      * @return Returns the codeBaseEntry.
93      */

94     public ICodeBaseEntry getCodeBaseEntry() {
95         return codeBaseEntry;
96     }
97
98     /**
99      * @param codeBaseEntry The codeBaseEntry to set.
100      */

101     public void setCodeBaseEntry(ICodeBaseEntry codeBaseEntry) {
102         this.codeBaseEntry = codeBaseEntry;
103     }
104
105     /**
106      * @return Returns the interfaceDescriptorList.
107      */

108     public ClassDescriptor[] getInterfaceDescriptorList() {
109         return interfaceDescriptorList;
110     }
111
112     /**
113      * @param interfaceDescriptorList The interfaceDescriptorList to set.
114      */

115     public void setInterfaceDescriptorList(ClassDescriptor[] interfaceDescriptorList) {
116         this.interfaceDescriptorList = interfaceDescriptorList;
117     }
118
119     /**
120      * @return Returns the superclassDescriptor.
121      */

122     public ClassDescriptor getSuperclassDescriptor() {
123         return superclassDescriptor;
124     }
125
126     /**
127      * @param superclassDescriptor The superclassDescriptor to set.
128      */

129     public void setSuperclassDescriptor(ClassDescriptor superclassDescriptor) {
130         this.superclassDescriptor = superclassDescriptor;
131     }
132
133 }
134
Popular Tags