/****************************************************************************** * Copyright (c) 2009-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.sun.java.xml.ns.jbi.impl; import com.sun.java.xml.ns.jbi.ClassPath; import com.sun.java.xml.ns.jbi.JbiPackage; import java.util.Collection; import org.eclipse.emf.common.util.EList; 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.EObjectImpl; import org.eclipse.emf.ecore.util.EDataTypeEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Class Path</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link com.sun.java.xml.ns.jbi.impl.ClassPathImpl#getPathElement <em>Path Element</em>}</li> * </ul> * </p> * * @generated */ public class ClassPathImpl extends EObjectImpl implements ClassPath { /** * The cached value of the '{@link #getPathElement() <em>Path Element</em>}' attribute list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPathElement() * @generated * @ordered */ protected EList<String> pathElement; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ClassPathImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return JbiPackage.Literals.CLASS_PATH; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<String> getPathElement() { if (pathElement == null) { pathElement = new EDataTypeEList<String>(String.class, this, JbiPackage.CLASS_PATH__PATH_ELEMENT); } return pathElement; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case JbiPackage.CLASS_PATH__PATH_ELEMENT: return getPathElement(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case JbiPackage.CLASS_PATH__PATH_ELEMENT: getPathElement().clear(); getPathElement().addAll((Collection<? extends String>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case JbiPackage.CLASS_PATH__PATH_ELEMENT: getPathElement().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case JbiPackage.CLASS_PATH__PATH_ELEMENT: return pathElement != null && !pathElement.isEmpty(); } 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(" (pathElement: "); result.append(pathElement); result.append(')'); return result.toString(); } } //ClassPathImpl