/**
 */
package org.etsi.mts.tdl.impl;

import java.lang.reflect.InvocationTargetException;

import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.WrappedException;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EOperation;

import org.etsi.mts.tdl.PackageableElement;
import org.etsi.mts.tdl.tdlPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Packageable Element</b></em>'.
 * <!-- end-user-doc -->
 *
 * @generated
 */
public abstract class PackageableElementImpl extends NamedElementImpl implements PackageableElement
{
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected PackageableElementImpl()
	{
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass()
	{
		return tdlPackage.Literals.PACKAGEABLE_ELEMENT;
	}

	/**
	 * The cached invocation delegate for the '{@link #conformsTo(java.lang.String) <em>Conforms To</em>}' operation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #conformsTo(java.lang.String)
	 * @generated
	 * @ordered
	 */
	protected static final EOperation.Internal.InvocationDelegate CONFORMS_TO_STRING__EINVOCATION_DELEGATE = ((EOperation.Internal)tdlPackage.Literals.PACKAGEABLE_ELEMENT___CONFORMS_TO__STRING).getInvocationDelegate();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Boolean conformsTo(String n)
	{
		try {
			return (Boolean)CONFORMS_TO_STRING__EINVOCATION_DELEGATE.dynamicInvoke(this, new BasicEList.UnmodifiableEList<Object>(1, new Object[]{n}));
		}
		catch (InvocationTargetException ite) {
			throw new WrappedException(ite);
		}
	}

	/**
	 * The cached invocation delegate for the '{@link #getElementNamed(java.lang.String) <em>Get Element Named</em>}' operation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getElementNamed(java.lang.String)
	 * @generated
	 * @ordered
	 */
	protected static final EOperation.Internal.InvocationDelegate GET_ELEMENT_NAMED_STRING__EINVOCATION_DELEGATE = ((EOperation.Internal)tdlPackage.Literals.PACKAGEABLE_ELEMENT___GET_ELEMENT_NAMED__STRING).getInvocationDelegate();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public PackageableElement getElementNamed(String n)
	{
		try {
			return (PackageableElement)GET_ELEMENT_NAMED_STRING__EINVOCATION_DELEGATE.dynamicInvoke(this, new BasicEList.UnmodifiableEList<Object>(1, new Object[]{n}));
		}
		catch (InvocationTargetException ite) {
			throw new WrappedException(ite);
		}
	}

	/**
	 * The cached invocation delegate for the '{@link #conformsTo(org.etsi.mts.tdl.PackageableElement) <em>Conforms To</em>}' operation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #conformsTo(org.etsi.mts.tdl.PackageableElement)
	 * @generated
	 * @ordered
	 */
	protected static final EOperation.Internal.InvocationDelegate CONFORMS_TO_PACKAGEABLE_ELEMENT__EINVOCATION_DELEGATE = ((EOperation.Internal)tdlPackage.Literals.PACKAGEABLE_ELEMENT___CONFORMS_TO__PACKAGEABLEELEMENT).getInvocationDelegate();

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Boolean conformsTo(PackageableElement n)
	{
		try {
			return (Boolean)CONFORMS_TO_PACKAGEABLE_ELEMENT__EINVOCATION_DELEGATE.dynamicInvoke(this, new BasicEList.UnmodifiableEList<Object>(1, new Object[]{n}));
		}
		catch (InvocationTargetException ite) {
			throw new WrappedException(ite);
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
	{
		switch (operationID) {
			case tdlPackage.PACKAGEABLE_ELEMENT___CONFORMS_TO__STRING:
				return conformsTo((String)arguments.get(0));
			case tdlPackage.PACKAGEABLE_ELEMENT___GET_ELEMENT_NAMED__STRING:
				return getElementNamed((String)arguments.get(0));
			case tdlPackage.PACKAGEABLE_ELEMENT___CONFORMS_TO__PACKAGEABLEELEMENT:
				return conformsTo((PackageableElement)arguments.get(0));
		}
		return super.eInvoke(operationID, arguments);
	}

} //PackageableElementImpl
