org.eclipse.m2m.atl.engine
Class AtlDefaultCompiler

java.lang.Object
  extended by org.eclipse.m2m.atl.engine.AtlDefaultCompiler
All Implemented Interfaces:
AtlStandaloneCompiler
Direct Known Subclasses:
Atl2004Compiler, Atl2006Compiler

public abstract class AtlDefaultCompiler
extends java.lang.Object
implements AtlStandaloneCompiler

Default implementation of methods necessary for all ATL compilers. Attention: This class MUST NOT reference any types of the platform (e.g. IFile), because it must be usable stand-alone, without Eclipse, too.


Constructor Summary
AtlDefaultCompiler()
           
 
Method Summary
 CompileTimeError[] compile(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.InputStream in, java.lang.String outputFileName)
          Compiles an ATL script and returns easily accessible error messages.
protected abstract  java.net.URL getCodegeneratorURL()
          Returns the URL of the ATL compiler transformation; to be implemented by concrete subclass.
protected abstract  java.net.URL getSemanticAnalyzerURL()
          Returns the ATL WFR URL (whatever that may be); to be implemented by concrete subclass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtlDefaultCompiler

public AtlDefaultCompiler()
Method Detail

compile

public final CompileTimeError[] compile(java.io.InputStream in,
                                        java.lang.String outputFileName)
Description copied from interface: AtlStandaloneCompiler
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)
Description copied from interface: AtlStandaloneCompiler
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)

getSemanticAnalyzerURL

protected abstract java.net.URL getSemanticAnalyzerURL()
Returns the ATL WFR URL (whatever that may be); to be implemented by concrete subclass.

Returns:
the URL

getCodegeneratorURL

protected abstract java.net.URL getCodegeneratorURL()
Returns the URL of the ATL compiler transformation; to be implemented by concrete subclass.

Returns:
the URL of the compiler itself

Copyright 2007 IBM Corporation and others.
All Rights Reserved.