KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > innig > macker > structure > HollowClassInfo


1 /*______________________________________________________________________________
2  *
3  * Macker http://innig.net/macker/
4  *
5  * Copyright 2002-2003 Paul Cantrell
6  *
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License version 2, as published by the
9  * Free Software Foundation. See the file LICENSE.html for more information.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the license for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
17  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
18  *______________________________________________________________________________
19  */

20  
21 package net.innig.macker.structure;
22
23 import java.util.Set JavaDoc;
24 import net.innig.collect.MultiMap;
25
26 /**
27     Holds a class name, and lazily loads other attributes.
28 */

29 public class HollowClassInfo
30     extends AbstractClassInfo
31     {
32     public HollowClassInfo(ClassManager classManager, String JavaDoc className)
33         {
34         super(classManager);
35         this.className = className;
36         }
37     
38     public String JavaDoc getFullName()
39         { return className; }
40
41     public boolean isComplete() { return getActual().isComplete(); }
42     public boolean isInterface() { return getActual().isInterface(); }
43     public boolean isAbstract() { return getActual().isAbstract(); }
44     public boolean isFinal() { return getActual().isFinal(); }
45     public AccessModifier getAccessModifier() { return getActual().getAccessModifier(); }
46     public ClassInfo getExtends() { return getActual().getExtends(); }
47     public Set JavaDoc getImplements() { return getActual().getImplements(); }
48     public Set JavaDoc getDirectSupertypes() { return getActual().getDirectSupertypes(); }
49     public Set JavaDoc getSupertypes() { return getActual().getSupertypes(); }
50     public MultiMap getReferences() { return getActual().getReferences(); }
51
52     private ClassInfo getActual()
53         {
54         if(actual == null)
55             actual = getClassManager().loadClassInfo(className);
56         return actual;
57         }
58     
59     private String JavaDoc className;
60     private ClassInfo actual;
61     }
62
63
64
Popular Tags