In the mean time I gave myself a crash course on Doc composer and I have to say that this is definitely an impressive feature. I now also understand why you used javaDetail and can confirm that this is correct.
But there are some caveats to address.
For example… To rule out mishaps I started to concentrate on examples from the documentation (doc composer writers guide), in specific a very elementary detail: the description.
Check this out:
<ValueChecker property="description">
<Text>A description was found!</Text>
</ValueChecker>
If you test this routine you’ll discover something very interesting: it only evaluates to true if no description was found. This is a bit confusing at first (at least it was for me), especially if you consider that ‘value’ is an optional property. But it makes sense: by not defining the ‘value’ property it won’t have an actual value (empty) so… you’re checking for a property with an empty value.
And I think that this aspect could be related to your results above (note: this is only a wild theory of mine so far). Consider this:
<HasValueChecker property="javaDetail" modelType="JavaClassCodeDetail">
<Text>An annotation was found!</Text>
<ValueChecker property="javaDetail" operator="not equals" value="">
<Property property="javaDetail" />
</ValueChecker>
</HasValueChecker>
The result of this is “unnamed”. So there definitely is some kind of element to work with here!
If I then study JavaClassCodeDetail some more I find the ‘annotation’ property, and that’s the thing we’re after here!
So right now I think the main problem is that ‘annotations’ is a property within the ‘javaDetail’ property. And to make this worse: the data we’re after is within the annotations (that is the actual JavaAnnotation class).
(in case you’re wondering about my current (maybe somewhat chaotic) writing style: I’m actually thinking and experimenting while writing all this).
Anyway, this is also where I’m currently stuck:
<HasValueChecker property="javaDetail" modelType="JavaClassCodeDetail">
<Text>An annotation was found:</Text>
<Property property="javaDetail"/>
<ParagraphBreak/>
<ValueChecker property="javaDetail" operator="not equals" value="">
<Text>javaDetail has an actual value!</Text>
<ForEach property="javaDetail">
<Property property="name"/>
<Property property="annotations"/>
</ForEach>
<IterationBlock modelType="JavaClassCodeDetail">
<Property property="name"/>
<Property property="annotations"/>
</IterationBlock>
</ValueChecker>
</HasValueChecker>
I’m probably overlooking something but can’t put my finger on it just yet.
Hopefully this might give you some more ideas, I’m going to continue this tomorrow.