| /******************************************************************************* |
| * Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| * 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: |
| <<<<<<< HEAD |
| * Pierre Allard - initial API and implementation |
| * Regent L'Archeveque |
| * |
| ======= |
| * Pierre Allard, |
| * Regent L'Archeveque - initial API and implementation |
| * |
| >>>>>>> refs/heads/eclipse_pa |
| * SPDX-License-Identifier: EPL-1.0 |
| * |
| *******************************************************************************/ |
| package org.eclipse.apogy.common.images.converters; |
| |
| import org.eclipse.apogy.common.converters.IConverter; |
| import org.eclipse.apogy.common.images.AbstractEImage; |
| import org.eclipse.emf.ecore.EObject; |
| |
| public class EObjectToAbstractEImage implements IConverter { |
| |
| @Override |
| public Class<?> getOutputType() { |
| return AbstractEImage.class; |
| } |
| |
| @Override |
| public Class<?> getInputType() { |
| return EObject.class; |
| } |
| |
| @Override |
| public boolean canConvert(Object input) { |
| return input instanceof AbstractEImage; |
| } |
| |
| @Override |
| public Object convert(Object input) throws Exception { |
| return input; |
| } |
| |
| } |