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/01 15:33:53 UTC

[attributes] support for multiple tags with the same name?

Hi,

I'm tinkering with annotating my test cases with attributes
for reporting purposes. In particular, I want to associate
test cases with their corresponding requirements, where
each test case can be associated with one or more requirements,
e.g:

 /**
  * @requirement foo.req1
  * @requirement foo.req2
  */
 public void testFoo() {
 }

Unfortunately, commons-attributes doesn't support multiple values
for a given tag. Now I could change the above to:

 /**
  * @requirement foo.req1, foo.req2
  */
 public void testFoo() {
 }

and parse the tag value, but thats getting a little ugly.

Is there any reason for multiple tag values not being supported?
If not, could AttributeFinder be expanded to add methods like:

	Attribute[] getAttributes(Class aClass, String attribute);
      ...
	Attribute[] getAttributes(Field field, String attribute);

I'm happy to submit a proposal, but thought I'd get some
feedback first.

Regards,

Tim

 




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org