Hi,

On Wed, Feb 25, 2009 at 7:13 PM, Tonny Kohar <[email protected]> wrote:
> Hi,
>
> On Wed, Feb 25, 2009 at 7:00 PM, Tonny Kohar <[email protected]> wrote:
>>> For the 'current Composite' (CompositeDescriptor called earlier), if
>>> it extends the declaring class, then the method is public.
>>>
>>> Class compositeClass = ... // from visitor call.
>>>
>>> Class mixinMethodClass = method().getDeclaringClass();
>>> if( compositeClass.isAssignableFrom( mixinMethodClass ) )
>>> {
>>>    // it is public methods
>>> }
>>> else
>>> {
>>>    // it is private methods
>>> }
>>>
>>
>> It still does not produce the correct result. It is because the way
>> the entity declared
>>
>> @Mixins( PersonEntity.PersonMixin.class )
>> interface PersonEntity extends Person, EntityComposite
>> {
>>    class PersonMixin
>>        implements Person
>>    {
>>    ......
>>    }
>> }
>
> I mean is it the way the entity declared ?
> I got the compositeClass from compositeDescriptor.type()
>

Just forget or ignore the above. It is the opposite
rather than if( compositeClass.isAssignableFrom( mixinMethodClass ) )
it should be if( mixinMethodClass.isAssignableFrom( compositeClass ) )

Cheers
Tonny Kohar

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to