| /******************************************************************************* |
| * Copyright (c) 2007, 2018 Borland Software Corporation 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: |
| * Borland Software Corporation - initial API and implementation |
| * Alex Paperno - bugs 404647 |
| *******************************************************************************/ |
| |
| package org.eclipse.m2m.internal.qvt.oml.stdlib; |
| |
| import org.eclipse.emf.ecore.EOperation; |
| import org.eclipse.m2m.internal.qvt.oml.ast.env.QvtOperationalEvaluationEnv; |
| import org.eclipse.m2m.internal.qvt.oml.evaluator.ModuleInstance; |
| |
| |
| public abstract class CallHandler { |
| |
| public abstract Object invoke(ModuleInstance module, Object source, Object[] args, QvtOperationalEvaluationEnv evalEnv); |
| |
| public boolean isMutator() { |
| return false; |
| } |
| |
| public static class Access { |
| public static CallHandler getHandler(EOperation operation) { |
| return CallHandlerAdapter.getDispatcher(operation); |
| } |
| |
| public static boolean hasHandler(EOperation operation) { |
| return getHandler(operation) != null; |
| } |
| } |
| |
| } |
| |