7 * A delegating ClassPathEntry which refuses to clear/reload its
8 * delegate. Used to wrap bootclasspath entries. An implementation
9 * of the Decorator pattern.
11 * Copyright (C) 2001 Eric D. Friedman (eric@hfriedman.rdsl.lmi.net)
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 * Created: Tuesday Aug 14 19:46:52 2001
29 * @author Eric D. Friedman
30 * @version $Id: ImmutableClassPathEntry.java,v 1.1 2001/08/15 06:31:27 eric Exp $
33 class ImmutableClassPathEntry extends ClassPathEntry {
34 ClassPathEntry delegate;
37 * Creates an instance of ImmutableClassPathEntry which delegates
38 * all methods to delegate with the exception of clear/reload
41 * @param delegate a <code>ClassPathEntry</code> value
42 * @return an <code>ImmutableClassPathEntry</code> value
44 ImmutableClassPathEntry (ClassPathEntry delegate){
46 this.delegate = delegate;
50 * invoke load on the delegate if it isn't already loaded.
52 * @exception IOException if an error occurs
54 void load() throws IOException {
55 if (! delegate.isLoaded()) {
57 } // end of if (delegate.isLoaded())
71 * @exception IOException if an error occurs
78 * forwarded to delegate.
80 * @param unqualifiedName a <code>String</code> value
81 * @return a <code>List</code> value
82 * @exception IOException if an error occurs
84 List getClassNames(String unqualifiedName)
86 return delegate.getClassNames(unqualifiedName);
89 }// ImmutableClassPathEntry