play.routes.compiler.templates
Helper methods used in the templates
Attributes
Members list
Value members
Concrete methods
Generate a base identifier for the given route
Generate a base identifier for the given route
Attributes
Encode the given String constant as a triple quoted String.
Encode the given String constant as a triple quoted String.
This will split the String at any $ characters, and use concatenation to concatenate a single $ String followed be the remainder, this is to avoid "possible missing interpolator" false positive warnings.
That is to say:
/foo/$id<[^/]+>
Will be encoded as:
"""/foo/""" + "$" + """id<[^/]+>"""
Attributes
Generate a controller method call for the given injected route
Generate a controller method call for the given injected route
Attributes
Generate a invoker object identifier for the given route
Generate a invoker object identifier for the given route
Attributes
Generate the Javascript call
Generate the Javascript call
Attributes
Collect all the routes that apply to a single action that are not dead.
Collect all the routes that apply to a single action that are not dead.
Dead routes occur when two routes route to the same action with the same parameters. When reverse routing, this means the one reverse router, depending on the parameters, will return different URLs. But if they have the same parameters, or no parameters, then after the first one, the subsequent ones will be dead code, never matching.
This optimization not only saves on code generated, but since the body of the JavaScript router is a series of very long String concatenation, this is hard work on the typer, which can easily stack overflow.
Attributes
Generate the Javascript code for the parameter constraints.
Generate the Javascript code for the parameter constraints.
This generates the contents of an if statement in JavaScript, and is used for when multiple routes route to the same action but with different parameters. If there are no constraints, None will be returned.
Attributes
Extract the local names out from the route, as List. See PR#4244
Extract the local names out from the route, as List. See PR#4244
Attributes
Extract the local names out from the route
Extract the local names out from the route
Attributes
Mark lines with source map information.
Mark lines with source map information.
Attributes
Generate the reverse call
Generate the reverse call
Attributes
Calculate the local names that need to be matched
Calculate the local names that need to be matched
Attributes
Reverse parameters for matching
Reverse parameters for matching
Attributes
Generate the reverse parameter constraints
Generate the reverse parameter constraints
In routes like /dummy controllers.Application.dummy(foo = "bar") foo = "bar" is a constraint
Attributes
Calculate the parameters for the reverse route call for the given routes.
Calculate the parameters for the reverse route call for the given routes.
Attributes
Calculate the parameters for the javascript reverse route call for the given routes.
Calculate the parameters for the javascript reverse route call for the given routes.
Attributes
Generate the reverse route context
Generate the reverse route context
Attributes
Generate the parameter signature for the reverse route call for the given routes.
Generate the parameter signature for the reverse route call for the given routes.
Attributes
Calculate the unique reverse constraints, and generate them using the given block
Calculate the unique reverse constraints, and generate them using the given block
Attributes
A route binding
A route binding
Attributes
Generate a route object identifier for the given route
Generate a route object identifier for the given route
Attributes
Generate a router object identifier
Generate a router object identifier
Attributes
Ensure that the given keyword doesn't clash with any of the keywords that Play is using, including Scala keywords.
Ensure that the given keyword doesn't clash with any of the keywords that Play is using, including Scala keywords.
Attributes
Extract the local names out from the route, as tuple. See PR#4244
Extract the local names out from the route, as tuple. See PR#4244