/****************************************************************************** * Copyright (c) 2011-2013, Linagora * * 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: * Linagora - initial API and implementation *******************************************************************************/ package com.ebmwebsourcing.petals.services.jsr181.jsr181.impl; import com.ebmwebsourcing.petals.services.jsr181.jsr181.Jsr181Package; import com.ebmwebsourcing.petals.services.jsr181.jsr181.Jsr181Provides; import com.sun.java.xml.ns.jbi.impl.ProvidesImpl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Provides</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link com.ebmwebsourcing.petals.services.jsr181.jsr181.impl.Jsr181ProvidesImpl#getClazz <em>Clazz</em>}</li> * </ul> * </p> * * @generated */ public class Jsr181ProvidesImpl extends ProvidesImpl implements Jsr181Provides { /** * The default value of the '{@link #getClazz() <em>Clazz</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getClazz() * @generated * @ordered */ protected static final String CLAZZ_EDEFAULT = null; /** * The cached value of the '{@link #getClazz() <em>Clazz</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getClazz() * @generated * @ordered */ protected String clazz = CLAZZ_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Jsr181ProvidesImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return Jsr181Package.Literals.JSR181_PROVIDES; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getClazz() { return clazz; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setClazz(String newClazz) { String oldClazz = clazz; clazz = newClazz; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Jsr181Package.JSR181_PROVIDES__CLAZZ, oldClazz, clazz)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Jsr181Package.JSR181_PROVIDES__CLAZZ: return getClazz(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Jsr181Package.JSR181_PROVIDES__CLAZZ: setClazz((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Jsr181Package.JSR181_PROVIDES__CLAZZ: setClazz(CLAZZ_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Jsr181Package.JSR181_PROVIDES__CLAZZ: return CLAZZ_EDEFAULT == null ? clazz != null : !CLAZZ_EDEFAULT.equals(clazz); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (clazz: "); result.append(clazz); result.append(')'); return result.toString(); } } //Jsr181ProvidesImpl