org.eclipse.xtend.middleend.xpand
Class XpandBackendFacade

java.lang.Object
  extended by org.eclipse.xtend.middleend.xpand.XpandBackendFacade

public final class XpandBackendFacade
extends java.lang.Object

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

Method Summary
static XpandBackendFacade createForFile(java.lang.String xpandFilename, java.lang.String fileEncoding, java.util.Collection<MetaModel> mms, java.util.Collection<Outlet> outlets)
           
static java.lang.Object executeStatement(java.lang.String code, java.util.Collection<MetaModel> mms, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.Collection<Outlet> outlets, XpandProtectedRegionResolver resolver, boolean isLogStackTrace)
          This method executes Xpand code that is passed in as a string, script language style.
There are two restrictions.
 java.lang.Object executeStatement(java.lang.String code, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.List<java.lang.String> advice, XpandProtectedRegionResolver resolver, boolean isLogStackTrace)
           
 java.lang.Object executeStatement(java.lang.String code, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.Map<java.lang.String,java.lang.Object> globalVars, java.util.List<java.lang.String> advice, XpandProtectedRegionResolver resolver, boolean isLogStackTrace)
           
static java.lang.Object executeStatement(java.lang.String code, java.lang.String fileEncoding, java.util.Collection<MetaModel> mms, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.Collection<Outlet> outlets, java.util.List<java.lang.String> advice, XpandProtectedRegionResolver resolver, boolean isLogStackTrace)
          This method executes Xpand code that is passed in as a string, script language style.
There are two restrictions.
static java.lang.Object executeStatement(java.lang.String code, java.lang.String fileEncoding, java.util.Collection<MetaModel> mms, java.util.Map<java.lang.String,java.lang.Object> variables, java.util.Collection<Outlet> outlets, XpandProtectedRegionResolver resolver, boolean isLogStackTrace)
          This method executes Xpand code that is passed in as a string, script language style.
There are two restrictions.
 java.util.Collection<NamedFunction> getContributedFunctions()
           
 FunctionDefContext getFunctionDefContext()
           
static void registerOutlets(ExecutionContext ctx, java.util.Collection<Outlet> outlets)
           
static void registerProtectedRegionResolver(ExecutionContext ctx, XpandProtectedRegionResolver resolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

executeStatement

public static java.lang.Object executeStatement(java.lang.String code,
                                                java.util.Collection<MetaModel> mms,
                                                java.util.Map<java.lang.String,java.lang.Object> variables,
                                                java.util.Collection<Outlet> outlets,
                                                XpandProtectedRegionResolver resolver,
                                                boolean isLogStackTrace)
This method executes Xpand code that is passed in as a string, script language style.
There are two restrictions. Firstly, no DEFINEs are allowed - the string that is passed in must be a valid body for a DEFINE. Never mind the "parameters" - the "variables" parameter defines all variables that will be defined during execution. Use "this" as a variable name to specify the variable that is implicitly bound as the "special" parameter passed to a definition.
Secondly, no IMPORT or EXTENSION statements are possible. So types must be referenced by their fully qualified names, and no calls to extensions are possible. Calls to other templates that are available as files are possible, just as you would expect.
Both the "variables" and "outlets" parameter may be null.


executeStatement

public static java.lang.Object executeStatement(java.lang.String code,
                                                java.lang.String fileEncoding,
                                                java.util.Collection<MetaModel> mms,
                                                java.util.Map<java.lang.String,java.lang.Object> variables,
                                                java.util.Collection<Outlet> outlets,
                                                XpandProtectedRegionResolver resolver,
                                                boolean isLogStackTrace)
This method executes Xpand code that is passed in as a string, script language style.
There are two restrictions. Firstly, no DEFINEs are allowed - the string that is passed in must be a valid body for a DEFINE. Never mind the "parameters" - the "variables" parameter defines all variables that will be defined during execution. Use "this" as a variable name to specify the variable that is implicitly bound as the "special" parameter passed to a definition.
Secondly, no IMPORT or EXTENSION statements are possible. So types must be referenced by their fully qualified names, and no calls to extensions are possible. Calls to other templates that are available as files are possible, just as you would expect.
Both the "variables" and "outlets" parameter may be null.


executeStatement

public static java.lang.Object executeStatement(java.lang.String code,
                                                java.lang.String fileEncoding,
                                                java.util.Collection<MetaModel> mms,
                                                java.util.Map<java.lang.String,java.lang.Object> variables,
                                                java.util.Collection<Outlet> outlets,
                                                java.util.List<java.lang.String> advice,
                                                XpandProtectedRegionResolver resolver,
                                                boolean isLogStackTrace)
This method executes Xpand code that is passed in as a string, script language style.
There are two restrictions. Firstly, no DEFINEs are allowed - the string that is passed in must be a valid body for a DEFINE. Never mind the "parameters" - the "variables" parameter defines all variables that will be defined during execution. Use "this" as a variable name to specify the variable that is implicitly bound as the "special" parameter passed to a definition.
Secondly, no IMPORT or EXTENSION statements are possible. So types must be referenced by their fully qualified names, and no calls to extensions are possible. Calls to other templates that are available as files are possible, just as you would expect.
The "variables", "outlets" and "advice" parameter may be null.


executeStatement

public java.lang.Object executeStatement(java.lang.String code,
                                         java.util.Map<java.lang.String,java.lang.Object> variables,
                                         java.util.List<java.lang.String> advice,
                                         XpandProtectedRegionResolver resolver,
                                         boolean isLogStackTrace)

executeStatement

public java.lang.Object executeStatement(java.lang.String code,
                                         java.util.Map<java.lang.String,java.lang.Object> variables,
                                         java.util.Map<java.lang.String,java.lang.Object> globalVars,
                                         java.util.List<java.lang.String> advice,
                                         XpandProtectedRegionResolver resolver,
                                         boolean isLogStackTrace)

registerOutlets

public static void registerOutlets(ExecutionContext ctx,
                                   java.util.Collection<Outlet> outlets)

registerProtectedRegionResolver

public static void registerProtectedRegionResolver(ExecutionContext ctx,
                                                   XpandProtectedRegionResolver resolver)

createForFile

public static XpandBackendFacade createForFile(java.lang.String xpandFilename,
                                               java.lang.String fileEncoding,
                                               java.util.Collection<MetaModel> mms,
                                               java.util.Collection<Outlet> outlets)

getContributedFunctions

public java.util.Collection<NamedFunction> getContributedFunctions()

getFunctionDefContext

public FunctionDefContext getFunctionDefContext()