| /** |
| ******************************************************************************** |
| * Copyright (c) 2021 Robert Bosch GmbH. |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Robert Bosch GmbH - initial API and implementation |
| ******************************************************************************** |
| */ |
| |
| package org.eclipse.app4mc.slg.commons.m2t.transformers.sw; |
| |
| import org.eclipse.app4mc.amalthea.model.LabelAccess; |
| import org.eclipse.app4mc.slg.commons.m2t.generators.LabelAccessTranslationUnit; |
| import org.eclipse.app4mc.slg.commons.m2t.generators.LabelTranslationUnit; |
| import org.eclipse.app4mc.transformation.util.OutputBuffer; |
| |
| import com.google.inject.Inject; |
| import com.google.inject.Singleton; |
| |
| @Singleton |
| public class LabelAccessTransformer { |
| |
| @Inject private OutputBuffer outputBuffer; |
| @Inject private LabelTransformer labelTransformer; |
| |
| public LabelAccessTranslationUnit transform(final LabelAccess labelAccess) { |
| final LabelTranslationUnit tuLabel = this.labelTransformer.transform(labelAccess.getData()); |
| return new LabelAccessTranslationUnit(this.outputBuffer, tuLabel, labelAccess); |
| } |
| |
| } |