Alex Tkachman | 1 Aug 07:22 2008
Picon

Re: [groovy-dev] HandleMetaClass

It is just implementation detail for per instance meta classes. The
idea is to keep reference for source class or object, when we take it
from somewhere and to be able to mutate it later.

On Fri, Aug 1, 2008 at 2:14 AM, Jochen Theodorou <blackdrag@...> wrote:
> Hi all,
>
> looks like the class HandleMetaclasswas added. It seems to be a proxy to the
> real meta class. I might have missed something, but when did we discuss this
> change?
>
> 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
>
>
>

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

(Continue reading)

Jochen Theodorou | 1 Aug 10:54 2008
Picon

Re: [groovy-dev] HandleMetaClass

Alex Tkachman schrieb:
> It is just implementation detail for per instance meta classes. The
> idea is to keep reference for source class or object, when we take it
> from somewhere and to be able to mutate it later.

Alex, it is an implementation detail if the user will not see any 
changes in his code. This is not the case. It broke much of my code for 
example. And worse, we had the idiom that foo.metaClass=null will remove 
the per instance MetaClass on foo is foo is an instance of GroovyObject. 
This is no longer the case. As of this, it is not an implementation 
detail, but a breaking change. How am I supposed to do that now?

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 10:56 2008
Picon

Re: [groovy-dev] HandleMetaClass

Of course, foo.metaClass = null MUST remove per instance meta class.
if it doesn't it is a bug to be fixed and I will have a look later
today. I guess the problem is somewhere in call site caching

On Fri, Aug 1, 2008 at 12:54 PM, Jochen Theodorou <blackdrag@...> wrote:
> Alex Tkachman schrieb:
>>
>> It is just implementation detail for per instance meta classes. The
>> idea is to keep reference for source class or object, when we take it
>> from somewhere and to be able to mutate it later.
>
> Alex, it is an implementation detail if the user will not see any changes in
> his code. This is not the case. It broke much of my code for example. And
> worse, we had the idiom that foo.metaClass=null will remove the per instance
> MetaClass on foo is foo is an instance of GroovyObject. This is no longer
> the case. As of this, it is not an implementation detail, but a breaking
> change. How am I supposed to do that now?
>
> 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)

Jochen Theodorou | 1 Aug 11:00 2008
Picon

Re: [groovy-dev] HandleMetaClass

Alex Tkachman schrieb:
> Of course, foo.metaClass = null MUST remove per instance meta class.
> if it doesn't it is a bug to be fixed and I will have a look later
> today. I guess the problem is somewhere in call site caching

well, see my other mail from this night. I included two example scripts 
showing the old and new behaviour.. the script for the new behaviour is 
showing that the Metaclass is not exchanged.. or it was late... 
Nevertheless... is there a specific reasons as of why foo.metaClass must 
return the handle?

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 11:06 2008
Picon

Re: [groovy-dev] HandleMetaClass

Because otherwise foo.metaClass.bar = {...} will modify meta class in
registry in case of GroovyObject and per instance meta class in case
of POJO

On Fri, Aug 1, 2008 at 1:00 PM, Jochen Theodorou <blackdrag@...> wrote:
> Alex Tkachman schrieb:
>>
>> Of course, foo.metaClass = null MUST remove per instance meta class.
>> if it doesn't it is a bug to be fixed and I will have a look later
>> today. I guess the problem is somewhere in call site caching
>
> well, see my other mail from this night. I included two example scripts
> showing the old and new behaviour.. the script for the new behaviour is
> showing that the Metaclass is not exchanged.. or it was late...
> Nevertheless... is there a specific reasons as of why foo.metaClass must
> return the handle?
>
> 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)

Alex Tkachman | 1 Aug 12:11 2008
Picon

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

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

     /**
      * Retrieves a list of MetaMethod instances held by this class
      *  <at> 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 2008
Picon

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

Alex Tkachman schrieb:
>     /**
>      * Retrieves a list of MetaMethods held by the class
>      *
>      *  <at> return A list of MetaMethods
>      *
>      */
>      List getMethods();
> 
>      /**
>       * Retrieves a list of MetaMethod instances held by this class
>       *  <at> 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)

Guillaume Laforge | 1 Aug 12:18 2008
Picon

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
>     *
>     *  <at> return A list of MetaMethods
>     *
>     */
>     List getMethods();
>
>     /**
>      * Retrieves a list of MetaMethod instances held by this class
>      *  <at> 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)

Alex Tkachman | 1 Aug 12:18 2008
Picon

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
>>     *
>>     *  <at> return A list of MetaMethods
>>     *
>>     */
>>     List getMethods();
>>
>>     /**
>>      * Retrieves a list of MetaMethod instances held by this class
>>      *  <at> 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 2008
Picon

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


Gmane