Yes, I want to know what statement a "body tag" belongs to. A statement could be virtually any valid java statement.
The relation between a body tag and a statement is given by the position of the body tag, i.e., the tag is placed just ahead of the statement. I would call the relationship unidirectional, meaning: the tag referrs to the statement, and the statement needn't know about the tag. There is no code generator involved (that would parse the tags and generate code from the information contained in them), nor do I want to use the tags to modify the execution behaviour of the code. I just want to gather information from source code, nothing more (although it may be difficult).
With a comment, one could give virtually any meta information, just think about a comment written by a human in natural language. Another human knowing the same language could understand it, a computer program could not (nowadays, maybe in 50 years). Because of that I want to have tags with a syntax defined by myself. It is not necessary handling the syntax with QDOX, as I just need the plain text of the tag and then could do anything I want with it (process it).
The meta information I want to bring in is to describe the semantic aspects of statements. For example: "The following statement is used to notify another objects about an event currently occured". Or: "The following statement is used to create and return a new instance of an object". Of course, one could instead "tag" the called method (if the statement was a method call, which is not always the case), because then we could deduce that a caller of that method wants to do what the method is tagged for. But that's just a special case and it would not be very convenient to always tag the method called instead of being able to tag the calling statement. Additionally, the class in which the method resides, could be contained within a jar file...
Klaus
Klausi,
Could you provide an example of what you mean.
Thanks
-Joe