1
/*******************************************************************************
2
* Copyright (c) 2007 Intel 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
9
* Intel Corporation - Initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.internal.core.cdtvariables;
13
import org.eclipse.cdt.core.cdtvariables.ICdtVariable;
15
public class VariableChangeEvent {
16
private static final ICdtVariable[] EMPTY_VAR_ARRAY = new ICdtVariable[0];
18
private ICdtVariable[] fAddedVars, fRemovedVars, fChangedVars;
20
VariableChangeEvent(ICdtVariable[] addedVars, ICdtVariable[] removedVars, ICdtVariable[] changedVars){
21
fAddedVars = addedVars != null ? (ICdtVariable[])addedVars.clone() : null;
22
fRemovedVars = removedVars != null ? (ICdtVariable[])removedVars.clone() : null;
23
fChangedVars = changedVars != null ? (ICdtVariable[])changedVars.clone() : null;
25
public ICdtVariable[] getAddedVariables(){
26
return fAddedVars != null ? (ICdtVariable[])fAddedVars.clone() : EMPTY_VAR_ARRAY;
29
public ICdtVariable[] getRemovedVariables(){
30
return fRemovedVars != null ? (ICdtVariable[])fRemovedVars.clone() : EMPTY_VAR_ARRAY;
33
public ICdtVariable[] getChangedVariables(){
34
return fChangedVars != null ? (ICdtVariable[])fChangedVars.clone() : EMPTY_VAR_ARRAY;