Class GeneratedFile<L extends ICompilationUnit>
- java.lang.Object
-
- org.palladiosimulator.protocom.lang.GeneratedFile<L>
-
- All Implemented Interfaces:
ICompilationUnit
- Direct Known Subclasses:
BuildProperties,Classpath,JCompilationUnit,JeeClasspath,JeeComponentFile,JeeDeploymentDescriptor,JeeEjbDescriptor,JeeFacetCore,JeeGlassfishEjbDescriptor,JeeManifest,JeePreferences,JeeReadMe,JeeSettings,JseManifest,PluginXml,TestPlan
public abstract class GeneratedFile<L extends ICompilationUnit> extends Object implements ICompilationUnit
Abstract class representing generated files. Generic type defines the common interface for language and provider classes.
-
-
Constructor Summary
Constructors Constructor Description GeneratedFile()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description GeneratedFile<L>createFor(L concept)Inject the provider for this generated file.StringfilePath()Path and name of the generated file.abstract Stringgenerate()Generate the source code for this compilation unit.StringprojectName()voidstore()Store the generated file using Xtext/Xtend file system access.
-
-
-
Field Detail
-
injector
@Inject protected com.google.inject.Injector injector
-
fsa
@Inject protected org.eclipse.xtext.generator.AbstractFileSystemAccess2 fsa
File System Access used for storing this file.
-
provider
protected L extends ICompilationUnit provider
Provider for this compilation unit. Providers need to implement the language interface, since these are used for delegation. TODO: Add (Xtend) annotations which generate the boilerplate code for provider delegation. e.g. @Provided
-
-
Method Detail
-
filePath
public String filePath()
Description copied from interface:ICompilationUnitPath and name of the generated file.- Specified by:
filePathin interfaceICompilationUnit
-
projectName
public String projectName()
- Specified by:
projectNamein interfaceICompilationUnit
-
createFor
public GeneratedFile<L> createFor(L concept)
Inject the provider for this generated file.
-
generate
public abstract String generate()
Generate the source code for this compilation unit.
-
store
public void store()
Store the generated file using Xtext/Xtend file system access.
-
-