Where do a Grails controller's "expando" methods come from?
According to the documentation, a Grails controller is simply a class with
"Controller" appended to the name and saved in grails-app/controllers/.
The simplest of such a class being:
package some.package
class FooController {
def index = {}
}
When the Grails application is run, this controller will inherit some
standard methods like getParams and getSession. From the attached
screenshot I can see that these are added via
groovy.lang.ExpandoMetaClass. What I don't see is how this happens. The
controller doesn't implement any interfaces or extend any abstractions.
Where do these methods come from?
No comments:
Post a Comment