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

List:       groovy-user
Subject:    [groovy-user] Re[groovy-user] turn type on dynamically added method
From:       Keith Thomas <keith.thomas () gmail ! com>
Date:       2009-03-30 21:31:16
Message-ID: 22793365.post () talk ! nabble ! com
[Download RAW message or body]


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.
-- 
View this message in context: \
http://www.nabble.com/Return-type-on-dynamically-added-method-tp22793365p22793365.html
 Sent from the groovy - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
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