/******************************************************************************* * Copyright (c) 2005, 2009 IBM Corporation 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: * IBM Corporation - initial implementation *******************************************************************************/ package org.eclipse.epf.xml.uma.impl; import java.util.Collection; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.util.EDataTypeEList; import org.eclipse.epf.xml.uma.Kind; import org.eclipse.epf.xml.uma.UmaPackage; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Kind</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.epf.xml.uma.impl.KindImpl#getApplicableMetaClassInfo <em>Applicable Meta Class Info</em>}</li> * </ul> * </p> * * @generated */ public class KindImpl extends ContentElementImpl implements Kind { /** * The cached value of the '{@link #getApplicableMetaClassInfo() <em>Applicable Meta Class Info</em>}' attribute list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getApplicableMetaClassInfo() * @generated * @ordered */ protected EList<String> applicableMetaClassInfo; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected KindImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return UmaPackage.Literals.KIND; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<String> getApplicableMetaClassInfo() { if (applicableMetaClassInfo == null) { applicableMetaClassInfo = new EDataTypeEList<String>(String.class, this, UmaPackage.KIND__APPLICABLE_META_CLASS_INFO); } return applicableMetaClassInfo; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case UmaPackage.KIND__APPLICABLE_META_CLASS_INFO: return getApplicableMetaClassInfo(); } 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 UmaPackage.KIND__APPLICABLE_META_CLASS_INFO: getApplicableMetaClassInfo().clear(); getApplicableMetaClassInfo().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 UmaPackage.KIND__APPLICABLE_META_CLASS_INFO: getApplicableMetaClassInfo().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case UmaPackage.KIND__APPLICABLE_META_CLASS_INFO: return applicableMetaClassInfo != null && !applicableMetaClassInfo.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(" (applicableMetaClassInfo: "); result.append(applicableMetaClassInfo); result.append(')'); return result.toString(); } } //KindImpl