blob: c6e90a91e8099c927a9097b73ddc5c23f81ad54a [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2020 Robert Bosch GmbH and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Generated using Eclipse EMF
*
* *******************************************************************************
*/
package org.eclipse.app4mc.slg.config.impl;
import org.eclipse.app4mc.slg.config.ConfigurationPackage;
import org.eclipse.app4mc.slg.config.CustomImpl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Custom Impl</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.app4mc.slg.config.impl.CustomImplImpl#isEnable <em>Enable</em>}</li>
* <li>{@link org.eclipse.app4mc.slg.config.impl.CustomImplImpl#getValue <em>Value</em>}</li>
* </ul>
*
* @generated
*/
public class CustomImplImpl extends MinimalEObjectImpl.Container implements CustomImpl {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = "*******************************************************************************\n Copyright (c) 2020 Robert Bosch GmbH and others.\n\n This program and the accompanying materials are made\n available under the terms of the Eclipse Public License 2.0\n which is available at https://www.eclipse.org/legal/epl-2.0/\n\n SPDX-License-Identifier: EPL-2.0\n\n Generated using Eclipse EMF\n\n*******************************************************************************";
/**
* The default value of the '{@link #isEnable() <em>Enable</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isEnable()
* @generated
* @ordered
*/
protected static final boolean ENABLE_EDEFAULT = false;
/**
* The cached value of the '{@link #isEnable() <em>Enable</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #isEnable()
* @generated
* @ordered
*/
protected boolean enable = ENABLE_EDEFAULT;
/**
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected static final String VALUE_EDEFAULT = null;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected String value = VALUE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CustomImplImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ConfigurationPackage.Literals.CUSTOM_IMPL;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isEnable() {
return enable;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setEnable(boolean newEnable) {
boolean oldEnable = enable;
enable = newEnable;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CUSTOM_IMPL__ENABLE, oldEnable, enable));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setValue(String newValue) {
String oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CUSTOM_IMPL__VALUE, oldValue, value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ConfigurationPackage.CUSTOM_IMPL__ENABLE:
return isEnable();
case ConfigurationPackage.CUSTOM_IMPL__VALUE:
return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case ConfigurationPackage.CUSTOM_IMPL__ENABLE:
setEnable((Boolean)newValue);
return;
case ConfigurationPackage.CUSTOM_IMPL__VALUE:
setValue((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ConfigurationPackage.CUSTOM_IMPL__ENABLE:
setEnable(ENABLE_EDEFAULT);
return;
case ConfigurationPackage.CUSTOM_IMPL__VALUE:
setValue(VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ConfigurationPackage.CUSTOM_IMPL__ENABLE:
return enable != ENABLE_EDEFAULT;
case ConfigurationPackage.CUSTOM_IMPL__VALUE:
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (enable: ");
result.append(enable);
result.append(", value: ");
result.append(value);
result.append(')');
return result.toString();
}
} //CustomImplImpl