blob: 5305b3eb08a2654180f2117581bbb14a6c831abf [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2009, 2019 Mia-Software and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
*
* Fabien Giquel (Mia-Software) - initial API and implementation
* Gregoire DUPE (Mia-Software) - initial API and implementation
* *******************************************************************************
*
* $Id$
*/
package org.eclipse.modisco.java.cdo.impl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.modisco.java.AbstractMethodDeclaration;
import org.eclipse.modisco.java.AbstractMethodInvocation;
import org.eclipse.modisco.java.Expression;
import org.eclipse.modisco.java.SuperMethodInvocation;
import org.eclipse.modisco.java.TypeAccess;
import org.eclipse.modisco.java.cdo.meta.JavaPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Super Method Invocation</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.modisco.java.cdo.impl.SuperMethodInvocationImpl#getMethod <em>Method</em>}</li>
* <li>{@link org.eclipse.modisco.java.cdo.impl.SuperMethodInvocationImpl#getArguments <em>Arguments</em>}</li>
* <li>{@link org.eclipse.modisco.java.cdo.impl.SuperMethodInvocationImpl#getTypeArguments <em>Type Arguments</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class SuperMethodInvocationImpl extends AbstractTypeQualifiedExpressionImpl implements SuperMethodInvocation {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SuperMethodInvocationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return JavaPackage.eINSTANCE.getSuperMethodInvocation();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AbstractMethodDeclaration getMethod() {
return (AbstractMethodDeclaration)eGet(JavaPackage.eINSTANCE.getAbstractMethodInvocation_Method(), true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMethod(AbstractMethodDeclaration newMethod) {
eSet(JavaPackage.eINSTANCE.getAbstractMethodInvocation_Method(), newMethod);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
public EList<Expression> getArguments() {
return (EList<Expression>)eGet(JavaPackage.eINSTANCE.getAbstractMethodInvocation_Arguments(), true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
public EList<TypeAccess> getTypeArguments() {
return (EList<TypeAccess>)eGet(JavaPackage.eINSTANCE.getAbstractMethodInvocation_TypeArguments(), true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == AbstractMethodInvocation.class) {
switch (derivedFeatureID) {
case JavaPackage.SUPER_METHOD_INVOCATION__METHOD: return JavaPackage.ABSTRACT_METHOD_INVOCATION__METHOD;
case JavaPackage.SUPER_METHOD_INVOCATION__ARGUMENTS: return JavaPackage.ABSTRACT_METHOD_INVOCATION__ARGUMENTS;
case JavaPackage.SUPER_METHOD_INVOCATION__TYPE_ARGUMENTS: return JavaPackage.ABSTRACT_METHOD_INVOCATION__TYPE_ARGUMENTS;
default: return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == AbstractMethodInvocation.class) {
switch (baseFeatureID) {
case JavaPackage.ABSTRACT_METHOD_INVOCATION__METHOD: return JavaPackage.SUPER_METHOD_INVOCATION__METHOD;
case JavaPackage.ABSTRACT_METHOD_INVOCATION__ARGUMENTS: return JavaPackage.SUPER_METHOD_INVOCATION__ARGUMENTS;
case JavaPackage.ABSTRACT_METHOD_INVOCATION__TYPE_ARGUMENTS: return JavaPackage.SUPER_METHOD_INVOCATION__TYPE_ARGUMENTS;
default: return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
} //SuperMethodInvocationImpl