blob: f4ab495ae12029770748f6b00d66b7ec08b07b98 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2013, 2017 CEA LIST 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:
* E.D.Willink(CEA LIST) - Initial API and implementation
*******************************************************************************/
package org.eclipse.ocl.examples.codegen.cgmodel.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.ocl.examples.codegen.cgmodel.CGLibraryPropertyCallExp;
import org.eclipse.ocl.examples.codegen.cgmodel.CGModelPackage;
import org.eclipse.ocl.examples.codegen.cgmodel.util.CGModelVisitor;
import org.eclipse.ocl.pivot.library.LibraryProperty;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>CG Library Property Call Exp</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.impl.CGLibraryPropertyCallExpImpl#getLibraryProperty <em>Library Property</em>}</li>
* </ul>
*
* @generated
*/
public class CGLibraryPropertyCallExpImpl extends CGPropertyCallExpImpl implements CGLibraryPropertyCallExp {
/**
* The default value of the '{@link #getLibraryProperty() <em>Library Property</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLibraryProperty()
* @generated
* @ordered
*/
protected static final LibraryProperty LIBRARY_PROPERTY_EDEFAULT = null;
/**
* The cached value of the '{@link #getLibraryProperty() <em>Library Property</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getLibraryProperty()
* @generated
* @ordered
*/
protected LibraryProperty libraryProperty = LIBRARY_PROPERTY_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CGLibraryPropertyCallExpImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return CGModelPackage.Literals.CG_LIBRARY_PROPERTY_CALL_EXP;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public LibraryProperty getLibraryProperty() {
return libraryProperty;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setLibraryProperty(LibraryProperty newLibraryProperty) {
LibraryProperty oldLibraryProperty = libraryProperty;
libraryProperty = newLibraryProperty;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, CGModelPackage.CG_LIBRARY_PROPERTY_CALL_EXP__LIBRARY_PROPERTY, oldLibraryProperty, libraryProperty));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return super.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CGModelPackage.CG_LIBRARY_PROPERTY_CALL_EXP__LIBRARY_PROPERTY:
return getLibraryProperty();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case CGModelPackage.CG_LIBRARY_PROPERTY_CALL_EXP__LIBRARY_PROPERTY:
setLibraryProperty((LibraryProperty)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CGModelPackage.CG_LIBRARY_PROPERTY_CALL_EXP__LIBRARY_PROPERTY:
setLibraryProperty(LIBRARY_PROPERTY_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CGModelPackage.CG_LIBRARY_PROPERTY_CALL_EXP__LIBRARY_PROPERTY:
return LIBRARY_PROPERTY_EDEFAULT == null ? libraryProperty != null : !LIBRARY_PROPERTY_EDEFAULT.equals(libraryProperty);
}
return super.eIsSet(featureID);
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public <R> R accept(@NonNull CGModelVisitor<R> visitor) {
return visitor.visitCGLibraryPropertyCallExp(this);
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isBoxed() {
return true;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isEcore() {
return false;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isUnboxed() {
return false;
}
} //CGLibraryPropertyCallExpImpl