blob: 6d948c68bbb02466ab24d36c660529d50b3db5b2 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2013, 2015 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.jdt.annotation.Nullable;
import org.eclipse.ocl.examples.codegen.cgmodel.CGElementId;
import org.eclipse.ocl.examples.codegen.cgmodel.CGExecutorProperty;
import org.eclipse.ocl.examples.codegen.cgmodel.CGInvalid;
import org.eclipse.ocl.examples.codegen.cgmodel.CGModelPackage;
import org.eclipse.ocl.examples.codegen.cgmodel.CGValuedElement;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>CG Executor Property</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.ocl.examples.codegen.cgmodel.impl.CGExecutorPropertyImpl#getUnderlyingPropertyId <em>Underlying Property Id</em>}</li>
* </ul>
*
* @generated
*/
public abstract class CGExecutorPropertyImpl extends CGValuedElementImpl implements CGExecutorProperty {
/**
* The cached value of the '{@link #getUnderlyingPropertyId() <em>Underlying Property Id</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUnderlyingPropertyId()
* @generated
* @ordered
*/
protected CGElementId underlyingPropertyId;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CGExecutorPropertyImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return CGModelPackage.Literals.CG_EXECUTOR_PROPERTY;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public CGElementId getUnderlyingPropertyId() {
return underlyingPropertyId;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setUnderlyingPropertyId(CGElementId newUnderlyingPropertyId) {
CGElementId oldUnderlyingPropertyId = underlyingPropertyId;
underlyingPropertyId = newUnderlyingPropertyId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, CGModelPackage.CG_EXECUTOR_PROPERTY__UNDERLYING_PROPERTY_ID, oldUnderlyingPropertyId, underlyingPropertyId));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case CGModelPackage.CG_EXECUTOR_PROPERTY__UNDERLYING_PROPERTY_ID:
return getUnderlyingPropertyId();
}
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_EXECUTOR_PROPERTY__UNDERLYING_PROPERTY_ID:
setUnderlyingPropertyId((CGElementId)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case CGModelPackage.CG_EXECUTOR_PROPERTY__UNDERLYING_PROPERTY_ID:
setUnderlyingPropertyId((CGElementId)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case CGModelPackage.CG_EXECUTOR_PROPERTY__UNDERLYING_PROPERTY_ID:
return underlyingPropertyId != null;
}
return super.eIsSet(featureID);
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public @Nullable CGInvalid getInvalidValue() {
return null;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isBoxed() {
return true;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isCaught() {
return false;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isConstant() {
return true;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isContext() {
return true;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isEcore() {
return false;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public @Nullable Boolean isEquivalentToInternal(@NonNull CGValuedElement thatValue) {
throw new UnsupportedOperationException(getClass().getName() + ".isEquivalentToInternal()");
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isGlobal() {
return false;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isInlined() {
return false;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isNonInvalid() {
return true;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isNonNull() {
return true;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isNull() {
return false;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isUnboxed() {
return false;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public boolean isUncommonable() {
return false;
}
/**
* {@inheritDoc}
* @generated
*/
@Override
public void setCaught(boolean isCaught) {
assert !isCaught;
}
} //CGExecutorPropertyImpl