You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Christophe Lombart <ch...@gmail.com> on 2007/10/01 12:16:31 UTC

[OCM] Annotations

Hi,


Right now, an annotation for a field has to be defined on the getter method.
ex:


class Mycontent
{
    private String path;
    ....
    @field (path=true)
    public String getPath()
    {
        return path;
    }

}

I would like to set the annotation before the attribute def like :

class Mycontent
{
    @field (path=true) private String path;
    ....

    public String getPath()
    {
        return path;
    }

}


Is it ok for you ?


Christophe

Re: [OCM] Annotations

Posted by Christophe Lombart <ch...@gmail.com>.
On 10/1/07, Felix Meschberger <fm...@gmail.com> wrote:
>
> Hi,
>
> Am Montag, den 01.10.2007, 12:16 +0200 schrieb Christophe Lombart:
> > I would like to set the annotation before the attribute def like :
> > ...
> >     @field (path=true) private String path;
>
> +1
>
> But, what if there is no Java field corresping directly to the
> descriptor field ? Perhaps, the annotation for getter should still be
> supported ?



no problem for me
Thanks


Christophe

Re: [OCM] Annotations

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Am Montag, den 01.10.2007, 12:16 +0200 schrieb Christophe Lombart:
> I would like to set the annotation before the attribute def like :
> ...
>     @field (path=true) private String path;

+1

But, what if there is no Java field corresping directly to the
descriptor field ? Perhaps, the annotation for getter should still be
supported ?

Regards
Felix