01: /*______________________________________________________________________________
02: *
03: * Macker http://innig.net/macker/
04: *
05: * Copyright 2002-2003 Paul Cantrell
06: *
07: * This program is free software; you can redistribute it and/or modify it under
08: * the terms of the GNU General Public License version 2, as published by the
09: * 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;
27:
28: public class AccessRuleViolation extends MackerEvent {
29: public AccessRuleViolation(AccessRule accessRule, ClassInfo from,
30: ClassInfo to, List/*<String>*/messages) {
31: super (accessRule, "Illegal reference" + CR //! hokey, hokey, hokey!
32: + " from " + from + CR + " to " + to, messages);
33: this .accessRule = accessRule;
34: this .from = from;
35: this .to = to;
36: }
37:
38: public final AccessRule getAccessRule() {
39: return accessRule;
40: }
41:
42: public final ClassInfo getFrom() {
43: return from;
44: }
45:
46: public final ClassInfo getTo() {
47: return to;
48: }
49:
50: private final AccessRule accessRule;
51: private final ClassInfo from, to;
52: private static final String CR = System
53: .getProperty("line.separator");
54: }
|