You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Tim Anderson <tm...@netspace.net.au> on 2003/06/02 13:58:29 UTC
[patch][attributes][proposal] support for multiple tags with the same name
Hi,
the attached patch for commons-attributes enables
support for multiple tags with the same name e.g
class Foo {
/**
* @mytag value1
* @mytag value2
*/
public void someMethod() {
}
}
These can be accessed via the new Attributes.getAttributes() methods
e.g:
Attribute[] a = Attributes.getAttributes(method, "mytag");
To support the above, I've had to change the serialization
format. The .attributes file now contains entries of the form
<prefix>|<tag>|<id>=<value>
e.g:
class|classDupAttribute|0=classValue1
class|classDupAttribute|1=classValue2
The SEPARATOR character has been changed from '_' to '|' to avoid
conflicts with member names that contain underscores.
Thoughts?
Thanks,
Tim
RE: [patch][attributes][proposal] support for multiple tags with the same name
Posted by Tim Anderson <tm...@netspace.net.au>.
Hmm - mailserver stripped the attachment out.
Trying again, this time jarred up....
> -----Original Message-----
> From: Tim Anderson [mailto:tma@netspace.net.au]
> Sent: Monday, 2 June 2003 9:58 PM
> To: commons-dev@jakarta.apache.org
> Subject: [patch][attributes][proposal] support for multiple tags with
> the same name
>
>
> Hi,
> the attached patch for commons-attributes enables
> support for multiple tags with the same name e.g
>
> class Foo {
>
> /**
> * @mytag value1
> * @mytag value2
> */
> public void someMethod() {
> }
> }
>
> These can be accessed via the new Attributes.getAttributes() methods
> e.g:
> Attribute[] a = Attributes.getAttributes(method, "mytag");
>
> To support the above, I've had to change the serialization
> format. The .attributes file now contains entries of the form
> <prefix>|<tag>|<id>=<value>
>
> e.g:
> class|classDupAttribute|0=classValue1
> class|classDupAttribute|1=classValue2
>
> The SEPARATOR character has been changed from '_' to '|' to avoid
> conflicts with member names that contain underscores.
>
>
> Thoughts?
>
> Thanks,
>
> Tim
>
>
>