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 Object implements AtlStandaloneCompiler
Invokes the ATL to EMFTVM compiler.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final ExecEnvPool`
`atlToEmftvmPool`
`protected final ExecEnvPool`
`atlWfrPool`
`protected final ExecEnvPool`
`inlineCodeblocksPool`
`protected final Metamodel`
`pbmm`
`protected final org.eclipse.emf.ecore.resource.ResourceSet`
`rs`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`final CompileTimeError[]`
`compile(InputStream in, String outputFileName)`
Compiles an ATL script and returns easily accessible error messages.
`CompileTimeError[]`
`compile(Reader in, String outputFileName)`
Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]`
`compileWithProblemModel(InputStream in, OutputStream outputStream)`
Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]`
`compileWithProblemModel(InputStream in, String outputFileName)`
Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]`
`compileWithProblemModel(Reader in, OutputStream outputStream)`
Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]`
`compileWithProblemModel(Reader in, String outputFileName)`
Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]`
`compileWithProblemModel(IModel atlModel, OutputStream outputStream)`
Compiles an ATL script and returns easily accessible error messages.
`org.eclipse.emf.ecore.EObject[]`
`compileWithProblemModel(IModel atlModel, String outputFileName)`
Compiles an ATL script and returns easily accessible error messages.
`protected ModuleResolverFactory`
`createModuleResolverFactory()`
Creates a new `ModuleResolverFactory`.
`protected int`
`getProblems(IModel problems, Collection<org.eclipse.emf.ecore.EObject> pbElements)`
Retrieves problem elements from `problems`.
`protected int`
`getProblems(Model problems, 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 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

### AtlToEmftvmCompiler

public AtlToEmftvmCompiler()
Creates a new `AtlToEmftvmCompiler`.

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