org.eclipse.xtend.middleend.plugins
Interface LanguageSpecificMiddleEndFactory

All Known Implementing Classes:
OldCheckRegistryFactory, OldXpandRegistryFactory, OldXtendRegistryFactory

public interface LanguageSpecificMiddleEndFactory

This interface is the common abstraction through which all handlers for different languages can contribute their middle ends. Every language should contribute its MiddleEnd implementation factory through the extension point.

Author:
Arno Haase (http://www.haase-consulting.com)

Method Summary
 LanguageSpecificMiddleEnd create(java.lang.Object specificData)
          This method creates the actual implementation of the middle end.
 java.lang.String getName()
          a clear text name describing the language / middle end
 int getPriority()
          the priority is a possible way to determine the order in which the middle ends are asked if they can handle a given resource.
 

Method Detail

getName

java.lang.String getName()
a clear text name describing the language / middle end


getPriority

int getPriority()
the priority is a possible way to determine the order in which the middle ends are asked if they can handle a given resource. Typically, only one middle end implementation should declare that it can handle a given resource (i.e. source file), and in this case a priority of 0 should be returned.
In the rare case where it is needed, highest priority is asked first.


create

LanguageSpecificMiddleEnd create(java.lang.Object specificData)
This method creates the actual implementation of the middle end. The specificData parameter is passed through from the MiddleEnd constructor.
It is permitted for implementations to throw an IllegalArgumentException, which is the official way for an implementation to say that it views the passed data as insufficient to perform, and therefore needs to be removed from the list of registered middle ends. This is done on a per-call basis and avoids the necessity to always initialize all middle end implementations.