KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > InvokeEvent


1 /*
2   Copyright (C) 2004 Laurent Martelli <laurent@aopsys.com>
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.aspects.gui;
19
20 import java.util.Arrays JavaDoc;
21 import org.objectweb.jac.core.rtti.AbstractMethodItem;
22
23 /**
24  * Event for a method invocation
25  */

26 public class InvokeEvent extends SubstanceEvent {
27     public InvokeEvent(View source,
28                        Object JavaDoc substance, AbstractMethodItem method,
29                        Object JavaDoc[] parameters) {
30         super(source,substance);
31         this.method = method;
32         this.parameters = parameters;
33     }
34
35     public InvokeEvent(View source,
36                        Object JavaDoc substance, AbstractMethodItem method) {
37         super(source,substance);
38         this.method = method;
39     }
40
41     /** Invoked method */
42     AbstractMethodItem method;
43     public AbstractMethodItem getMethod() {
44         return method;
45     }
46     public void setMethod(AbstractMethodItem newMethod) {
47         this.method = newMethod;
48     }
49
50     Object JavaDoc[] parameters;
51     public Object JavaDoc[] getParameters() {
52         return parameters;
53     }
54     public void setParameters(Object JavaDoc[] newParameters) {
55         this.parameters = newParameters;
56     }
57
58     public String JavaDoc toString() {
59         return "InvokeEvent{source="+source+", "+substance+"."+method.getLongName()+
60             " with "+(parameters!=null?Arrays.asList(parameters):null)+"}";
61     }
62 }
63
Popular Tags