org.eclipse.xtend.middleend
Class MiddleEndFactory

java.lang.Object
  extended by org.eclipse.xtend.middleend.MiddleEndFactory

public final class MiddleEndFactory
extends java.lang.Object

This class encapsulates the OSGi / Eclipse extension registry specific behavior and initialization code. It serves as an optional wrapper / convenience initialization code for the actual MiddleEnd class.

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

Constructor Summary
MiddleEndFactory()
           
 
Method Summary
static boolean canCreateFromExtentions()
           
static MiddleEnd create(BackendTypesystem ts, java.util.List<LanguageSpecificMiddleEnd> languageHandlers)
          This method creates a MiddleEnd instance based on an explicitly provided list of handlers.
static MiddleEnd createFromExtensions(BackendTypesystem ts, java.util.Map<java.lang.Class<?>,java.lang.Object> specificParams)
          This method creates a middle end based on the handlers registered with the extension point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiddleEndFactory

public MiddleEndFactory()
Method Detail

create

public static MiddleEnd create(BackendTypesystem ts,
                               java.util.List<LanguageSpecificMiddleEnd> languageHandlers)
This method creates a MiddleEnd instance based on an explicitly provided list of handlers. It works without OSGi.


createFromExtensions

public static MiddleEnd createFromExtensions(BackendTypesystem ts,
                                             java.util.Map<java.lang.Class<?>,java.lang.Object> specificParams)
This method creates a middle end based on the handlers registered with the extension point. It relies on OSGi and makes use of the Eclipse extension registry.
The map with "specific params" is used to initialize the contributed middle ends. The key must be the class implementing the LanguageSpecificMiddleEnd interface and contributed via the extension point.


canCreateFromExtentions

public static boolean canCreateFromExtentions()