blob: 3d70bf5fe2ffd554f004c89fc03e7db8ecd504b4 [file] [log] [blame]
/**
* *******************************************************************************
* Copyright (c) 2020 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
import com.google.inject.Inject
import com.google.inject.Singleton
import org.eclipse.app4mc.amalthea.model.LabelAccess
import org.eclipse.app4mc.slg.commons.m2t.generators.LabelAccessTranslationUnit
import org.eclipse.app4mc.transformation.transformers.AbstractTransformer
import org.eclipse.app4mc.transformation.util.OutputBuffer
@Singleton
class LabelAccessTransformer extends AbstractTransformer {
@Inject OutputBuffer outputBuffer
@Inject LabelTransformer labelTransformer
def LabelAccessTranslationUnit transform(LabelAccess labelAccess) {
val tuLabel = labelTransformer.transform(labelAccess.data)
return new LabelAccessTranslationUnit(outputBuffer, tuLabel, labelAccess)
}
}