All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.nakeduml.javageneration.auditing.AuditGenerationPhase Maven / Gradle / Ivy

The newest version!
package net.sf.nakeduml.javageneration.auditing;

import java.util.List;

import net.sf.nakeduml.feature.InputModel;
import net.sf.nakeduml.feature.NakedUmlConfig;
import net.sf.nakeduml.feature.PhaseDependency;
import net.sf.nakeduml.feature.TransformationContext;
import net.sf.nakeduml.feature.TransformationPhase;
import net.sf.nakeduml.filegeneration.FileGenerationPhase;
import net.sf.nakeduml.javageneration.JavaTransformationPhase;
import net.sf.nakeduml.javametamodel.annotation.OJAnnotatedPackage;
import net.sf.nakeduml.metamodel.workspace.INakedModelWorkspace;
import net.sf.nakeduml.textmetamodel.TextWorkspace;

@PhaseDependency(after = { JavaTransformationPhase.class }, before={FileGenerationPhase.class})
public class AuditGenerationPhase implements TransformationPhase {
	private NakedUmlConfig config;
	@InputModel
	private TextWorkspace textWorkspace;
	@InputModel
	INakedModelWorkspace workspace;
	@InputModel
	OJAnnotatedPackage javaModel;

	@Override
	public void initialize(NakedUmlConfig config) {
		this.config = config;
	}

	@Override
	public Object[] execute(List features) {
		TransformationContext context = new TransformationContext();
		for (AuditImplementationStep a : features) {
			a.initialize(javaModel, config, textWorkspace);
			a.generate(workspace, context);
		}
		return new Object[] { javaModel };
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy