Alex Tkachman | 1 Aug 12:10

[groovy-dev] MetaClass.getMethods() and MetaClass.getMetaMethods ()

    /**
     * Retrieves a list of MetaMethods held by the class
     *
     * @return A list of MetaMethods
     *
     */
     List getMethods();

     /**
      * Retrieves a list of MetaMethod instances held by this class
      * @return A list of MetaMethod instances
      */
     List getMetaMethods();

Could some one explain me expected difference please?

Alex

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

    http://xircles.codehaus.org/manage_email

Jochen Theodorou | 1 Aug 12:15
Gravatar

Re: [groovy-dev] MetaClass.getMethods() and MetaClass.getMetaMethods ()

Alex Tkachman schrieb:
>     /**
>      * Retrieves a list of MetaMethods held by the class
>      *
>      * @return A list of MetaMethods
>      *
>      */
>      List getMethods();
> 
>      /**
>       * Retrieves a list of MetaMethod instances held by this class
>       * @return A list of MetaMethod instances
>       */
>      List getMetaMethods();
> 
> Could some one explain me expected difference please?

MetaClassImpl says:

     public List getMethods() {
         return allMethods;
     }

     public List getMetaMethods() {
         return new ArrayList(newGroovyMethodsSet);
     }

bye blackdrag

--

-- 
(Continue reading)

Alex Tkachman | 1 Aug 12:18

Re: [groovy-dev] MetaClass.getMethods() and MetaClass.getMetaMethods ()

Jochen,

Of course, I asked on EXPECTED difference.

Alex

On Fri, Aug 1, 2008 at 2:15 PM, Jochen Theodorou <blackdrag@...> wrote:
> Alex Tkachman schrieb:
>>
>>    /**
>>     * Retrieves a list of MetaMethods held by the class
>>     *
>>     * @return A list of MetaMethods
>>     *
>>     */
>>     List getMethods();
>>
>>     /**
>>      * Retrieves a list of MetaMethod instances held by this class
>>      * @return A list of MetaMethod instances
>>      */
>>     List getMetaMethods();
>>
>> Could some one explain me expected difference please?
>
> MetaClassImpl says:
>
>    public List getMethods() {
>        return allMethods;
>    }
(Continue reading)

Jochen Theodorou | 1 Aug 12:25
Gravatar

Re: [groovy-dev] MetaClass.getMethods() and MetaClass.getMetaMethods ()

Alex Tkachman schrieb:
> Jochen,
> 
> Of course, I asked on EXPECTED difference.

what do you mean with expected? I expect it to behave like it did before 
  and so do most others that are using these methods. What exactly do 
you want to achieve?

bye blackdrag

--

-- 
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
http://www.g2one.com/

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

    http://xircles.codehaus.org/manage_email

Alex Tkachman | 1 Aug 12:31

Re: [groovy-dev] MetaClass.getMethods() and MetaClass.getMetaMethods ()

I want to understand what should I expect when call getMethods () and
what should I expect when call getMetaMethods (). Building meta method
index is pretty complicated story and I want to know what is DESIGNED
behavior of both methods.

On Fri, Aug 1, 2008 at 2:25 PM, Jochen Theodorou <blackdrag@...> wrote:
> Alex Tkachman schrieb:
>>
>> Jochen,
>>
>> Of course, I asked on EXPECTED difference.
>
> what do you mean with expected? I expect it to behave like it did before
>  and so do most others that are using these methods. What exactly do you
> want to achieve?
>
> bye blackdrag
>
> --
> Jochen "blackdrag" Theodorou
> The Groovy Project Tech Lead (http://groovy.codehaus.org)
> http://blackdragsview.blogspot.com/
> http://www.g2one.com/
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
(Continue reading)

Graeme Rocher | 1 Aug 12:45
Gravatar

Re: [groovy-dev] MetaClass.getMethods() and MetaClass.getMetaMethods ()

I believe this is historical, when I added EMC into the mix that
allowed you to add more MetaMethods for the first time. I wanted a way
to get a list of all the MetaMethods for meta-programming, including
the ones that had been added through EMC.

However, the existing implementation returned only the methods added
through DGM, I argued on the list to get it to return all methods, but
it was agreed the behaviour shouldn't change so it didn't and I added
a new method that returned all of them.

Of course the javadoc doesn't accurately describe that difference and
we should correct it to do so. Or even better fix the historical
difference and deprecate one of them

Cheers

On Fri, Aug 1, 2008 at 11:31 AM, Alex Tkachman
<alex.tkachman@...> wrote:
> I want to understand what should I expect when call getMethods () and
> what should I expect when call getMetaMethods (). Building meta method
> index is pretty complicated story and I want to know what is DESIGNED
> behavior of both methods.
>
> On Fri, Aug 1, 2008 at 2:25 PM, Jochen Theodorou <blackdrag@...> wrote:
>> Alex Tkachman schrieb:
>>>
>>> Jochen,
>>>
>>> Of course, I asked on EXPECTED difference.
>>
(Continue reading)

Guillaume Laforge | 1 Aug 12:18
Gravatar

Re: [groovy-dev] MetaClass.getMethods() and MetaClass.getMetaMethods ()

Don't hesitate to improve the JavaDoc as you find holes in the explanations.

On Fri, Aug 1, 2008 at 12:11 PM, Alex Tkachman
<alex.tkachman@...> wrote:
>    /**
>     * Retrieves a list of MetaMethods held by the class
>     *
>     * @return A list of MetaMethods
>     *
>     */
>     List getMethods();
>
>     /**
>      * Retrieves a list of MetaMethod instances held by this class
>      * @return A list of MetaMethod instances
>      */
>     List getMetaMethods();
>
> Could some one explain me expected difference please?
>
> Alex
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

(Continue reading)


Gmane