|
| 1 | +/******************************************************************************* |
| 2 | + * SysML 2 Pilot Implementation |
| 3 | + * Copyright (c) 2024 Model Driven Solutions, Inc. |
| 4 | + * |
| 5 | + * This program is free software: you can redistribute it and/or modify |
| 6 | + * it under the terms of the GNU Lesser General Public License as published by |
| 7 | + * the Free Software Foundation, either version 3 of the License, or |
| 8 | + * (at your option) any later version. |
| 9 | + * |
| 10 | + * This program is distributed in the hope that it will be useful, |
| 11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | + * GNU Lesser General Public License for more details. |
| 14 | + * |
| 15 | + * You should have received a copy of the GNU Lesser General Public License |
| 16 | + * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 17 | + * |
| 18 | + * @license LGPL-3.0-or-later <http://spdx.org/licenses/LGPL-3.0-or-later> |
| 19 | + * |
| 20 | + *******************************************************************************/ |
| 21 | + |
| 22 | +package org.omg.sysml.delegate.invocation; |
| 23 | + |
| 24 | +import java.lang.reflect.InvocationTargetException; |
| 25 | + |
| 26 | +import org.eclipse.emf.common.util.EList; |
| 27 | +import org.eclipse.emf.ecore.EOperation; |
| 28 | +import org.eclipse.emf.ecore.InternalEObject; |
| 29 | +import org.eclipse.emf.ecore.util.BasicInvocationDelegate; |
| 30 | +import org.omg.sysml.lang.sysml.Feature; |
| 31 | +import org.omg.sysml.lang.sysml.TransitionUsage; |
| 32 | +import org.omg.sysml.util.UsageUtil; |
| 33 | + |
| 34 | +public class TransitionUsage_sourceFeature_InvocationDelegate extends BasicInvocationDelegate { |
| 35 | + |
| 36 | + public TransitionUsage_sourceFeature_InvocationDelegate(EOperation operation) { |
| 37 | + super(operation); |
| 38 | + } |
| 39 | + |
| 40 | + @Override |
| 41 | + public Feature dynamicInvoke(InternalEObject target, EList<?> arguments) throws InvocationTargetException { |
| 42 | + TransitionUsage self = (TransitionUsage) target; |
| 43 | + return UsageUtil.getSourceFeatureOf(self); |
| 44 | + } |
| 45 | + |
| 46 | +} |
0 commit comments