blob: 37392903b6cbd2703cf6b1e2eef0f1181712d2f3 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Thales Global Services S.A.S.
* 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:
* Thales Global Services S.A.S - initial API and implementation
******************************************************************************/
package org.eclipse.emf.ecoretools.explorer.contextual.queries;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.amalgam.explorer.contextual.core.query.IQuery;
import org.eclipse.emf.ecore.EClass;
/**
* @author Boubekeur Zendagui
*/
public class EClassSuperClassesQuery implements IQuery {
public EClassSuperClassesQuery() {
}
@Override
public List<Object> compute(Object object_p) {
List<Object> result = new ArrayList<Object>();
if (object_p instanceof EClass)
{
result.addAll(((EClass)object_p).getEAllSuperTypes());
}
return result;
}
}