Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
def objName = new ObjectName("jmx.tutorial:type=Object")
def beans = jmx.export {
    bean(
        target: new RequestController(),
        name: objName,
        constructors:[
            "RequestController":[ "Object" ]
        ]
    )
}

Here, JmxBuilder will export a constructor that takes one parameter of type "Object". Again, JmxBuilder will use default values to fill in the description of the constructor and the parameters.

...

Code Block
def objName = new ObjectName("jmx.tutorial:type=Object")
def beans = jmx.export {
    bean(target: new RequestController(), name: objName,
        constructors:[
            "RequestController":[
                desc:"Constructor takes param",
                params:[ "Object" : [name:"Resource", desc:"Resource for controller"] ]
            ]
        ]
    )
}

...