On Thu, Jan 13, 2011 at 1:34 AM, Marc Grue <[email protected]> wrote:
> On 12/01/2011, at 01.41, Niclas Hedhman wrote:
>> The handling of Property methods is not special hard-coded internals.
>> If you look at Composite type, you will see that it has a
>> PropertyMixin declared, which you can replace with your own
>> implementation. So, I suggest that the Mixin extends PropertyMixin and
>> then implements Lifecycle, that should work.
>
> Since PropertyMixin is final I can't do:
Ok, I didn't recalled that. Class isn't bigger than you can clone it
source wise... Isn't it beautifu????!??
@AppliesTo( { PropertyMixin.PropertyFilter.class } )
public final class MyPropertyMixin
implements InvocationHandler, Lifecycle
{
@State
private StateHolder state;
public Object invoke( Object proxy, Method method, Object[] args )
throws Throwable
{
return state.getProperty( method );
}
// + Lifecycle your methods
}
--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/24svnvk
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev