KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > commands > ParameterTypeEvent


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.commands;
12
13 import org.eclipse.core.commands.common.AbstractHandleObjectEvent;
14
15 /**
16  * An instance of this class describes changes to an instance of
17  * {@link ParameterType}.
18  * <p>
19  * This class is not intended to be extended by clients.
20  * </p>
21  *
22  * @see IParameterTypeListener#parameterTypeChanged(ParameterTypeEvent)
23  * @since 3.2
24  */

25 public final class ParameterTypeEvent extends AbstractHandleObjectEvent {
26
27     /**
28      * The parameter type that has changed. This value is never
29      * <code>null</code>.
30      */

31     private final ParameterType parameterType;
32
33     /**
34      * Constructs a new instance.
35      *
36      * @param parameterType
37      * The parameter type that changed; must not be <code>null</code>.
38      * @param definedChanged
39      * <code>true</code>, iff the defined property changed.
40      */

41     ParameterTypeEvent(final ParameterType parameterType,
42             final boolean definedChanged) {
43
44         super(definedChanged);
45
46         if (parameterType == null) {
47             throw new NullPointerException JavaDoc();
48         }
49
50         this.parameterType = parameterType;
51     }
52
53     /**
54      * Returns the instance of the parameter type that changed.
55      *
56      * @return the instance of the parameter type that changed. Guaranteed not
57      * to be <code>null</code>.
58      */

59     public final ParameterType getParameterType() {
60         return parameterType;
61     }
62
63 }
64
Popular Tags