diff options
Diffstat (limited to 'plugins/org.eclipse.jem/mofjava/org/eclipse/jem/java/internal/impl/BlockImpl.java')
-rw-r--r-- | plugins/org.eclipse.jem/mofjava/org/eclipse/jem/java/internal/impl/BlockImpl.java | 243 |
1 files changed, 0 insertions, 243 deletions
diff --git a/plugins/org.eclipse.jem/mofjava/org/eclipse/jem/java/internal/impl/BlockImpl.java b/plugins/org.eclipse.jem/mofjava/org/eclipse/jem/java/internal/impl/BlockImpl.java deleted file mode 100644 index 6eff12ee5..000000000 --- a/plugins/org.eclipse.jem/mofjava/org/eclipse/jem/java/internal/impl/BlockImpl.java +++ /dev/null @@ -1,243 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2005 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 API and implementation - *******************************************************************************/ -package org.eclipse.jem.java.internal.impl; - -/* - * $RCSfile: BlockImpl.java,v $ - * $Revision: 1.1 $ $Date: 2005/09/14 23:30:32 $ - */ - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import org.eclipse.jem.java.Block; -import org.eclipse.jem.java.JavaRefPackage; - -/** - * @generated - */ -public class BlockImpl extends EObjectImpl implements Block{ - - /** - * The default value of the '{@link #getSource() <em>Source</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getSource() - * @generated - * @ordered - */ - protected static final String SOURCE_EDEFAULT = null; - - - /** - * @generated This field/method will be replaced during code generation. - */ - /** - * @generated This field/method will be replaced during code generation. - */ - protected String source = SOURCE_EDEFAULT; - /** - * The default value of the '{@link #getName() <em>Name</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * @generated This field/method will be replaced during code generation. - */ - protected String name = NAME_EDEFAULT; - /** - * The cached value of the '{@link #getContents() <em>Contents</em>}' containment reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @see #getContents() - * @generated - * @ordered - */ - protected EList contents = null; - - protected BlockImpl() { - super(); - } - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected EClass eStaticClass() { - return JavaRefPackage.eINSTANCE.getBlock(); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getSource() { - return source; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setSource(String newSource) { - String oldSource = source; - source = newSource; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JavaRefPackage.BLOCK__SOURCE, oldSource, source)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public String getName() { - return name; - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, JavaRefPackage.BLOCK__NAME, oldName, name)); - } - - /** - * @generated This field/method will be replaced during code generation - */ - public EList getContents() { - if (contents == null) { - contents = new EObjectContainmentEList(Block.class, this, JavaRefPackage.BLOCK__CONTENTS); - } - return contents; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { - if (featureID >= 0) { - switch (eDerivedStructuralFeatureID(featureID, baseClass)) { - case JavaRefPackage.BLOCK__CONTENTS: - return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); - default: - return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); - } - } - return eBasicSetContainer(null, featureID, msgs); - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public Object eGet(EStructuralFeature eFeature, boolean resolve) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JavaRefPackage.BLOCK__SOURCE: - return getSource(); - case JavaRefPackage.BLOCK__NAME: - return getName(); - case JavaRefPackage.BLOCK__CONTENTS: - return getContents(); - } - return eDynamicGet(eFeature, resolve); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public boolean eIsSet(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JavaRefPackage.BLOCK__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case JavaRefPackage.BLOCK__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case JavaRefPackage.BLOCK__CONTENTS: - return contents != null && !contents.isEmpty(); - } - return eDynamicIsSet(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eSet(EStructuralFeature eFeature, Object newValue) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JavaRefPackage.BLOCK__SOURCE: - setSource((String)newValue); - return; - case JavaRefPackage.BLOCK__NAME: - setName((String)newValue); - return; - case JavaRefPackage.BLOCK__CONTENTS: - getContents().clear(); - getContents().addAll((Collection)newValue); - return; - } - eDynamicSet(eFeature, newValue); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public void eUnset(EStructuralFeature eFeature) { - switch (eDerivedStructuralFeatureID(eFeature)) { - case JavaRefPackage.BLOCK__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case JavaRefPackage.BLOCK__NAME: - setName(NAME_EDEFAULT); - return; - case JavaRefPackage.BLOCK__CONTENTS: - getContents().clear(); - return; - } - eDynamicUnset(eFeature); - } - - /** - * @generated This field/method will be replaced during code generation. - */ - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (source: "); - result.append(source); - result.append(", name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} - - - - - |