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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.eclipse.xtext.generator.AbstractFileSystemAccess2
    File System Access used for storing this file.
    protected com.google.inject.Injector
     
    protected L
    Provider for this compilation unit.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createFor(L concept)
    Inject the provider for this generated file.
    Path and name of the generated file.
    abstract String
    Generate the source code for this compilation unit.
     
    void
    Store the generated file using Xtext/Xtend file system access.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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
  • Constructor Details

    • GeneratedFile

      public GeneratedFile()
  • Method Details

    • filePath

      public String filePath()
      Description copied from interface: ICompilationUnit
      Path and name of the generated file.
      Specified by:
      filePath in interface ICompilationUnit
    • projectName

      public String projectName()
      Specified by:
      projectName in interface ICompilationUnit
    • 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.