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 Modifier and Type Field Description protected ExecEnvPool
atlToEmftvmPool
protected ExecEnvPool
atlWfrPool
protected ExecEnvPool
inlineCodeblocksPool
protected Metamodel
pbmm
protected org.eclipse.emf.ecore.resource.ResourceSet
rs
-
Constructor Summary
Constructors Constructor Description AtlToEmftvmCompiler()
Creates a newAtlToEmftvmCompiler
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 newModuleResolverFactory
.protected int
getProblems(IModel problems, java.util.Collection<org.eclipse.emf.ecore.EObject> pbElements)
Retrieves problem elements fromproblems
.protected int
getProblems(Model problems, java.util.Collection<org.eclipse.emf.ecore.EObject> pbElements)
Retrieves problem elements fromproblems
.
-
-
-
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 newAtlToEmftvmCompiler
.
-
-
Method Detail
-
createModuleResolverFactory
protected ModuleResolverFactory createModuleResolverFactory()
Creates a newModuleResolverFactory
.- 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 interfaceAtlStandaloneCompiler
- 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 interfaceAtlStandaloneCompiler
- 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 interfaceAtlStandaloneCompiler
- 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 interfaceAtlStandaloneCompiler
- 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 interfaceAtlStandaloneCompiler
- 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 interfaceAtlStandaloneCompiler
- 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 interfaceAtlStandaloneCompiler
- 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 interfaceAtlStandaloneCompiler
- 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 fromproblems
.- Parameters:
problems
- the problems modelpbElements
- 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 fromproblems
.- Parameters:
problems
- the problems modelpbElements
- the collection of problem elements to augment- Returns:
- the number of error problems
-
-