01: /*
02: * Jacareto Copyright (c) 2002-2005
03: * Applied Computer Science Research Group, Darmstadt University of
04: * Technology, Institute of Mathematics & Computer Science,
05: * Ludwigsburg University of Education, and Computer Based
06: * Learning Research Group, Aachen University. All rights reserved.
07: *
08: * Jacareto is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public
10: * License as published by the Free Software Foundation; either
11: * version 2 of the License, or (at your option) any later version.
12: *
13: * Jacareto is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public
19: * License along with Jacareto; if not, write to the Free
20: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21: *
22: */
23:
24: package jacareto.toolkit;
25:
26: import java.util.EventObject;
27:
28: /**
29: * An event which indicates that the class loader has changed.
30: *
31: * @author <a href="mailto:cspannagel@web.de">Christian Spannagel</a>
32: * @version 1.01
33: */
34: public class JacaretoClassLoaderEvent extends EventObject {
35: /** Paths have been added to the class loader. */
36: public static final int PATHS_ADDED = 0;
37:
38: /** The id. */
39: private int id;
40:
41: /** Added paths. */
42: private String addedPaths;
43:
44: /**
45: * Creates a new event with the given source and id.
46: *
47: * @param source the source of the event (the class loader)
48: * @param id the id of the event
49: * @param addedPaths the added paths if the id is <code>PATHS_ADDED</code>
50: */
51: public JacaretoClassLoaderEvent(Object source, int id,
52: String addedPaths) {
53: super (source);
54: this .id = id;
55: this .addedPaths = addedPaths;
56: }
57:
58: /**
59: * Returns the id of the event.
60: *
61: * @return DOCUMENT ME!
62: */
63: public int getID() {
64: return id;
65: }
66:
67: /**
68: * Returns the added paths (only when the id is <code>PATHS_ADDED</code>).
69: *
70: * @return the paths which have been added
71: */
72: public String getAddedPaths() {
73: return addedPaths;
74: }
75: }
|