Class AtlToEmftvmCompiler

java.lang.Object
org.eclipse.m2m.atl.emftvm.compiler.AtlToEmftvmCompiler
All Implemented Interfaces:
AtlStandaloneCompiler

public class AtlToEmftvmCompiler extends Object implements AtlStandaloneCompiler
Invokes the ATL to EMFTVM compiler.
  • Field Details

    • rs

      protected final org.eclipse.emf.ecore.resource.ResourceSet rs
    • pbmm

      protected final Metamodel pbmm
    • atlWfrPool

      protected final ExecEnvPool atlWfrPool
    • atlToEmftvmPool

      protected final ExecEnvPool atlToEmftvmPool
    • inlineCodeblocksPool

      protected final ExecEnvPool inlineCodeblocksPool
  • Constructor Details

  • Method Details

    • createModuleResolverFactory

      protected ModuleResolverFactory createModuleResolverFactory()
      Creates a new ModuleResolverFactory.
      Returns:
      a new ModuleResolverFactory
    • compile

      public final CompileTimeError[] compile(InputStream in, String outputFileName)
      Compiles an ATL script and returns easily accessible error messages.
      Specified by:
      compile in interface AtlStandaloneCompiler
      Parameters:
      in - The InputStream to get atl source from.
      outputFileName - Name of the file to which the ATL compiled program will be saved.
      Returns:
      array of compiletime errors (0 length if no errors)
    • compileWithProblemModel

      public org.eclipse.emf.ecore.EObject[] compileWithProblemModel(InputStream in, String outputFileName)
      Compiles an ATL script and returns easily accessible error messages.
      Specified by:
      compileWithProblemModel in interface AtlStandaloneCompiler
      Parameters:
      in - The InputStream to get atl source from.
      outputFileName - Name of the file to which the ATL compiled program will be saved.
      Returns:
      array of compiletime errors as EObjects (0 length if no errors)
    • compileWithProblemModel

      public org.eclipse.emf.ecore.EObject[] compileWithProblemModel(InputStream in, OutputStream outputStream)
      Compiles an ATL script and returns easily accessible error messages.
      Specified by:
      compileWithProblemModel in interface AtlStandaloneCompiler
      Parameters:
      in - The InputStream to get atl source from.
      outputStream - the compilation ASM output stream
      Returns:
      array of compiletime errors as EObjects (0 length if no errors)
    • compile

      public CompileTimeError[] compile(Reader in, String outputFileName)
      Compiles an ATL script and returns easily accessible error messages.
      Specified by:
      compile in interface AtlStandaloneCompiler
      Parameters:
      in - The Reader to get atl source from.
      outputFileName - Name of the file to which the ATL compiled program will be saved.
      Returns:
      array of compiletime errors (0 length if no errors)
    • compileWithProblemModel

      public org.eclipse.emf.ecore.EObject[] compileWithProblemModel(Reader in, String outputFileName)
      Compiles an ATL script and returns easily accessible error messages.
      Specified by:
      compileWithProblemModel in interface AtlStandaloneCompiler
      Parameters:
      in - The Reader to get atl source from.
      outputFileName - Name of the file to which the ATL compiled program will be saved.
      Returns:
      array of compiletime errors as EObjects (0 length if no errors)
    • compileWithProblemModel

      public org.eclipse.emf.ecore.EObject[] compileWithProblemModel(Reader in, OutputStream outputStream)
      Compiles an ATL script and returns easily accessible error messages.
      Specified by:
      compileWithProblemModel in interface AtlStandaloneCompiler
      Parameters:
      in - The Reader to get atl source from.
      outputStream - the compilation ASM output stream
      Returns:
      array of compiletime errors as EObjects (0 length if no errors)
    • compileWithProblemModel

      public org.eclipse.emf.ecore.EObject[] compileWithProblemModel(IModel atlModel, OutputStream outputStream)
      Compiles an ATL script and returns easily accessible error messages.
      Specified by:
      compileWithProblemModel in interface AtlStandaloneCompiler
      Parameters:
      atlModel - The atlModel.
      outputStream - the compilation ASM output stream
      Returns:
      array of compiletime errors as EObjects (0 length if no errors)
    • compileWithProblemModel

      public org.eclipse.emf.ecore.EObject[] compileWithProblemModel(IModel atlModel, String outputFileName)
      Compiles an ATL script and returns easily accessible error messages.
      Specified by:
      compileWithProblemModel in interface AtlStandaloneCompiler
      Parameters:
      atlModel - The atlModel.
      outputFileName - Name of the file to which the ATL compiled program will be saved.
      Returns:
      array of compiletime errors as EObjects (0 length if no errors)
    • getProblems

      protected int getProblems(IModel problems, Collection<org.eclipse.emf.ecore.EObject> pbElements)
      Retrieves problem elements from problems.
      Parameters:
      problems - the problems model
      pbElements - the collection of problem elements to augment
      Returns:
      the number of error problems
    • getProblems

      protected int getProblems(Model problems, Collection<org.eclipse.emf.ecore.EObject> pbElements)
      Retrieves problem elements from problems.
      Parameters:
      problems - the problems model
      pbElements - the collection of problem elements to augment
      Returns:
      the number of error problems