org.eclipse.ocl.expressions.impl.PropertyCallExpImpl Maven / Gradle / Ivy
/**
*
*
* Copyright (c) 2006, 2009 IBM Corporation, Zeligsoft Inc., and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
* Zeligsoft - Bug 207365
*
*
*
* $Id: PropertyCallExpImpl.java,v 1.8 2009/01/23 17:16:04 cdamus Exp $
*/
package org.eclipse.ocl.expressions.impl;
import java.util.Map;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.ocl.expressions.ExpressionsPackage;
import org.eclipse.ocl.expressions.PropertyCallExp;
import org.eclipse.ocl.expressions.operations.PropertyCallExpOperations;
import org.eclipse.ocl.utilities.Visitor;
/**
*
* An implementation of the model object 'Property Call Exp'.
*
*
* The following features are implemented:
*
* - {@link org.eclipse.ocl.expressions.impl.PropertyCallExpImpl#getReferredProperty Referred Property}
*
*
*
* @generated
*/
public class PropertyCallExpImpl
extends NavigationCallExpImpl
implements PropertyCallExp {
/**
* The cached value of the '{@link #getReferredProperty() Referred Property}' reference.
*
*
* @see #getReferredProperty()
* @generated
* @ordered
*/
protected P referredProperty;
/**
*
*
* @generated
*/
protected PropertyCallExpImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return ExpressionsPackage.Literals.PROPERTY_CALL_EXP;
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
public P getReferredProperty() {
if (referredProperty != null && ((EObject) referredProperty).eIsProxy()) {
InternalEObject oldReferredProperty = (InternalEObject) referredProperty;
referredProperty = (P) eResolveProxy(oldReferredProperty);
if (referredProperty != oldReferredProperty) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(
this,
Notification.RESOLVE,
ExpressionsPackage.PROPERTY_CALL_EXP__REFERRED_PROPERTY,
oldReferredProperty, referredProperty));
}
}
return referredProperty;
}
/**
*
*
* @generated
*/
public P basicGetReferredProperty() {
return referredProperty;
}
/**
*
*
* @generated
*/
public void setReferredProperty(P newReferredProperty) {
P oldReferredProperty = referredProperty;
referredProperty = newReferredProperty;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET,
ExpressionsPackage.PROPERTY_CALL_EXP__REFERRED_PROPERTY,
oldReferredProperty, referredProperty));
}
/**
*
*
* @generated
*/
public boolean checkPropertyType(DiagnosticChain diagnostics,
Map