KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > innig > macker > event > AccessRuleViolation


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.event;
22
23 import net.innig.macker.rule.AccessRule;
24 import net.innig.macker.structure.ClassInfo;
25
26 import java.util.List JavaDoc;
27
28 public class AccessRuleViolation
29     extends MackerEvent
30     {
31     public AccessRuleViolation(
32             AccessRule accessRule,
33             ClassInfo from,
34             ClassInfo to,
35             List JavaDoc/*<String>*/ messages)
36         {
37         super(accessRule,
38             "Illegal reference" + CR //! hokey, hokey, hokey!
39
+ " from " + from + CR
40             + " to " + to,
41             messages);
42         this.accessRule = accessRule;
43         this.from = from;
44         this.to = to;
45         }
46     
47     public final AccessRule getAccessRule()
48         { return accessRule; }
49     
50     public final ClassInfo getFrom()
51         { return from; }
52         
53     public final ClassInfo getTo()
54         { return to; }
55     
56     private final AccessRule accessRule;
57     private final ClassInfo from, to;
58     private static final String JavaDoc CR = System.getProperty("line.separator");
59     }
60
Popular Tags