All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.ocl.cst.impl.StringLiteralExpCSImpl Maven / Gradle / Ivy

/**
 * 
 * 
 * Copyright (c) 2005, 2009 IBM Corporation, Zeligsoft Inc., Borland Software Corp., 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 - Initial API and implementation
 *   Zeligsoft - Bug 243976
 *   Borland - Bug 242880
 *
 * 
 *
 * $Id: StringLiteralExpCSImpl.java,v 1.4 2009/03/05 14:12:13 cdamus Exp $
 */
package org.eclipse.ocl.cst.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.ocl.cst.CSTPackage;
import org.eclipse.ocl.cst.StringLiteralExpCS;

/**
 * 
 * An implementation of the model object 'String Literal Exp CS'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.eclipse.ocl.cst.impl.StringLiteralExpCSImpl#getStringSymbol String Symbol}
  • *
  • {@link org.eclipse.ocl.cst.impl.StringLiteralExpCSImpl#getUnescapedStringSymbol Unescaped String Symbol}
  • *
*

* * @generated */ public class StringLiteralExpCSImpl extends PrimitiveLiteralExpCSImpl implements StringLiteralExpCS { /** * The default value of the '{@link #getStringSymbol() String Symbol}' attribute. * * * @see #getStringSymbol() * @generated * @ordered */ protected static final String STRING_SYMBOL_EDEFAULT = null; /** * The cached value of the '{@link #getStringSymbol() String Symbol}' attribute. * * * @see #getStringSymbol() * @generated * @ordered */ protected String stringSymbol = STRING_SYMBOL_EDEFAULT; /** * The default value of the '{@link #getUnescapedStringSymbol() Unescaped String Symbol}' attribute. * * @since 1.3 * * @see #getUnescapedStringSymbol() * @generated * @ordered */ protected static final String UNESCAPED_STRING_SYMBOL_EDEFAULT = null; /** * The cached value of the '{@link #getUnescapedStringSymbol() Unescaped String Symbol}' attribute. * * @since 1.3 * * @see #getUnescapedStringSymbol() * @generated * @ordered */ protected String unescapedStringSymbol = UNESCAPED_STRING_SYMBOL_EDEFAULT; /** * * * @generated */ protected StringLiteralExpCSImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return CSTPackage.Literals.STRING_LITERAL_EXP_CS; } /** * * * @generated */ public String getStringSymbol() { return stringSymbol; } /** * * * @generated */ public void setStringSymbol(String newStringSymbol) { String oldStringSymbol = stringSymbol; stringSymbol = newStringSymbol; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CSTPackage.STRING_LITERAL_EXP_CS__STRING_SYMBOL, oldStringSymbol, stringSymbol)); } /** * * @since 1.3 * * @generated */ public String getUnescapedStringSymbol() { return unescapedStringSymbol; } /** * * @since 1.3 * * @generated */ public void setUnescapedStringSymbol(String newUnescapedStringSymbol) { String oldUnescapedStringSymbol = unescapedStringSymbol; unescapedStringSymbol = newUnescapedStringSymbol; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CSTPackage.STRING_LITERAL_EXP_CS__UNESCAPED_STRING_SYMBOL, oldUnescapedStringSymbol, unescapedStringSymbol)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CSTPackage.STRING_LITERAL_EXP_CS__STRING_SYMBOL : return getStringSymbol(); case CSTPackage.STRING_LITERAL_EXP_CS__UNESCAPED_STRING_SYMBOL : return getUnescapedStringSymbol(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CSTPackage.STRING_LITERAL_EXP_CS__STRING_SYMBOL : setStringSymbol((String) newValue); return; case CSTPackage.STRING_LITERAL_EXP_CS__UNESCAPED_STRING_SYMBOL : setUnescapedStringSymbol((String) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CSTPackage.STRING_LITERAL_EXP_CS__STRING_SYMBOL : setStringSymbol(STRING_SYMBOL_EDEFAULT); return; case CSTPackage.STRING_LITERAL_EXP_CS__UNESCAPED_STRING_SYMBOL : setUnescapedStringSymbol(UNESCAPED_STRING_SYMBOL_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CSTPackage.STRING_LITERAL_EXP_CS__STRING_SYMBOL : return STRING_SYMBOL_EDEFAULT == null ? stringSymbol != null : !STRING_SYMBOL_EDEFAULT.equals(stringSymbol); case CSTPackage.STRING_LITERAL_EXP_CS__UNESCAPED_STRING_SYMBOL : return UNESCAPED_STRING_SYMBOL_EDEFAULT == null ? unescapedStringSymbol != null : !UNESCAPED_STRING_SYMBOL_EDEFAULT .equals(unescapedStringSymbol); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (stringSymbol: "); //$NON-NLS-1$ result.append(stringSymbol); result.append(", unescapedStringSymbol: "); //$NON-NLS-1$ result.append(unescapedStringSymbol); result.append(')'); return result.toString(); } } //StringLiteralExpCSImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy