Package org.eclipse.m2m.atl.emftvm.compiler

## Class AtlToEmftvmCompiler

- java.lang.Object
- - org.eclipse.m2m.atl.emftvm.compiler.AtlToEmftvmCompiler

All Implemented Interfaces:
  `AtlStandaloneCompiler`

    public class AtlToEmftvmCompiler
    extends java.lang.Object
    implements AtlStandaloneCompiler

Invokes the ATL to EMFTVM compiler.

### Field Summary

Fields
`protected ExecEnvPool` `atlToEmftvmPool`
`protected ExecEnvPool` `atlWfrPool`
`protected ExecEnvPool` `inlineCodeblocksPool`
`protected Metamodel` `pbmm`
`protected org.eclipse.emf.ecore.resource.ResourceSet` `rs`

### Constructor Summary

Constructors
`AtlToEmftvmCompiler()` Creates a new `AtlToEmftvmCompiler`.

### Method Summary

All Methods Instance Methods Concrete Methods
`CompileTimeError[]` `compile​(java.io.InputStream in, java.lang.String outputFileName)` Compiles an ATL script and returns easily accessible error messages.
`CompileTimeError[]` `compile​(java.io.Reader in, java.lang.String outputFileName)` Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]` `compileWithProblemModel​(java.io.InputStream in, java.io.OutputStream outputStream)` Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]` `compileWithProblemModel​(java.io.InputStream in, java.lang.String outputFileName)` Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]` `compileWithProblemModel​(java.io.Reader in, java.io.OutputStream outputStream)` Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]` `compileWithProblemModel​(java.io.Reader in, java.lang.String outputFileName)` Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]` `compileWithProblemModel​(IModel atlModel, java.io.OutputStream outputStream)` Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]` `compileWithProblemModel​(IModel atlModel, java.lang.String outputFileName)` Compiles an ATL script and returns easily accessible error messages.
`protected ModuleResolverFactory` `createModuleResolverFactory()` Creates a new `ModuleResolverFactory`.
`protected int` `getProblems​(IModel problems, java.util.Collection<org.eclipse.emf.ecore.EObject> pbElements)` Retrieves problem elements from `problems`.
`protected int` `getProblems​(Model problems, java.util.Collection<org.eclipse.emf.ecore.EObject> pbElements)` Retrieves problem elements from `problems`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### 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 Detail

#### AtlToEmftvmCompiler

    public AtlToEmftvmCompiler()

Creates a new `AtlToEmftvmCompiler`.

### Method Detail

#### createModuleResolverFactory

    protected ModuleResolverFactory createModuleResolverFactory()

Creates a new `ModuleResolverFactory`.

Returns:
  a new `ModuleResolverFactory`

#### compile

    public final CompileTimeError[] compile​(java.io.InputStream in,
                                            java.lang.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​(java.io.InputStream in,
                                                                   java.lang.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​(java.io.InputStream in,
                                                                   java.io.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​(java.io.Reader in,
                                      java.lang.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​(java.io.Reader in,
                                                                   java.lang.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​(java.io.Reader in,
                                                                   java.io.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,
                                                                   java.io.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,
                                                                   java.lang.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,
                              java.util.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,
                              java.util.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