org.eclipse.xtend.middleend.xpand
Class OldXpandRegistry

java.lang.Object
  extended by org.eclipse.xtend.middleend.xpand.OldXpandRegistry
All Implemented Interfaces:
LanguageSpecificMiddleEnd

public final class OldXpandRegistry
extends java.lang.Object
implements LanguageSpecificMiddleEnd

This class manages the interdependent graph of parsed and converted Xpand files, allowing access to them by "compilation unit".

Author:
Arno Haase (http://www.haase-consulting.com), André Arnold

Constructor Summary
OldXpandRegistry(java.lang.Object specificData)
           
 
Method Summary
 boolean canHandle(java.lang.String xpandFile)
          gives the middle end a way to declare if it can and wants to handle a given source file / resource.
 java.lang.String getName()
           
 boolean mayHandle(java.lang.String resourceName)
          gives the middle end a way to declare if it could possibly handle the given source file / resource based some weaker checks like filename extensions.
 ParsedResource parseResource(java.lang.String xpandFile)
          This method asks the middle end to parse a resource for which it declared that it is the appropriate handler, and return the functions contained therein.
Implementations are not required to perform any caching because the MiddleEnd implementation takes care of that.
 void setMiddleEnd(MiddleEnd middleEnd)
          This method is used to break the circular dependency between MiddleEnd and the language specific handlers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldXpandRegistry

public OldXpandRegistry(java.lang.Object specificData)
Method Detail

setMiddleEnd

public void setMiddleEnd(MiddleEnd middleEnd)
Description copied from interface: LanguageSpecificMiddleEnd
This method is used to break the circular dependency between MiddleEnd and the language specific handlers. It is called by the MiddleEnd on creation.

Specified by:
setMiddleEnd in interface LanguageSpecificMiddleEnd

canHandle

public boolean canHandle(java.lang.String xpandFile)
Description copied from interface: LanguageSpecificMiddleEnd
gives the middle end a way to declare if it can and wants to handle a given source file / resource. If and only if it returns true, it will be asked for the functions and advice provided in this resource.

Specified by:
canHandle in interface LanguageSpecificMiddleEnd

mayHandle

public boolean mayHandle(java.lang.String resourceName)
Description copied from interface: LanguageSpecificMiddleEnd
gives the middle end a way to declare if it could possibly handle the given source file / resource based some weaker checks like filename extensions. There no guarantee the this middleend can actually parse the source file / resource.

Specified by:
mayHandle in interface LanguageSpecificMiddleEnd

getName

public java.lang.String getName()
Specified by:
getName in interface LanguageSpecificMiddleEnd

parseResource

public ParsedResource parseResource(java.lang.String xpandFile)
Description copied from interface: LanguageSpecificMiddleEnd
This method asks the middle end to parse a resource for which it declared that it is the appropriate handler, and return the functions contained therein.
Implementations are not required to perform any caching because the MiddleEnd implementation takes care of that.

Specified by:
parseResource in interface LanguageSpecificMiddleEnd