[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-user
Subject:    Re: [groovy-user] Re[groovy-user] turn type on dynamically added
From:       Jeff Brown <jeff () jeffandbetsy ! net>
Date:       2009-03-30 21:57:00
Message-ID: bbd12f0f0903301457u306345fdt7c3fb5aacd73feb9 () mail ! gmail ! com
[Download RAW message or body]

On Mon, Mar 30, 2009 at 5:31 PM, Keith Thomas <keith.thomas@gmail.com> wrote:
>
> When I look at the api docs for ClosureMetaMethod I see this nice method,
>
>   Class getReturnType()
>
> When I do a toString() on my dynamically added method I see this,
>
>
> org.codehaus.groovy.runtime.metaclass.ClosureMetaMethod$MethodClosureMetaMethod@366b7d[name:
> helloWorld params: [] returns: class java.lang.Object owner: class
> MyDynamicGreeting]
>
> I am having difficulty figuring out how to add a method that has a return
> type different from the default of java.lang.Object.

May I ask why you want to do that?



Jeff
-- 
Jeff Brown
SpringSource
http://www.springsource.com/

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic