This class contains various macros to generate URL mappings using a class' metadata.

Static methods

staticcreateMappingArray (mappingClExpr:Dynamic, clExpr:Dynamic, metaTag:Dynamic):Dynamic

This will map a controller's methods to URLs using the given meta tag name.

This macro scans a controller for method metadata in order to generate mappings. This macro shouldn't have any dependency regarding the object it's called from, but it is most often used from a Module instance.

To use this macro, annotate a controller's method like this: @URL("/")

The macro will generate calls to the given URL mapping implementation's constructor. The first parameter given to the constructor will be the controller class to map. The second parameter will be the method (as a string) on which the controller metadata is applied. Finally, in the case of the example above, the last parameter will be the string "/".

Parameters:

mappingClExpr

The class of the URLMapping implementation to use

clExpr

The controller's class (must be an implementation of the Controller interface)

metaTag

The metadata tag that will be used to extract the URL information from a controller method.

Returns:

An array of expressions containing custom URL mapping instances