DocletTag[] valueTags = javaClass.getTagsByName(TagLibrary.EJB_VALUE_OBJECT);
int countTags;
if ((countTags = valueTags.length) > 0) {
for (int i = 0; i < countTags; i++) {
JavaClass newClass = new DuplicatedJavaClass(javaClass);
DocletTag[] tags = newClass.getTags();
List newTags = new ArrayList();
int tagIdx = 0;
for (int j = 0; j < tags.length; j++) {
DocletTag tag = tags[j];
if (TagLibrary.EJB_VALUE_OBJECT.equals(tag.getName())) {
if (tagIdx++ == i) {
newTags.add(tag);
}
} else {
newTags.add(tag);
}
}
// Set class tags
newClass.setTags(newTags);
// -----------------------------------------------------------------------
// We'll validate at 'QDoxValueObjectExpanderFilterMetadataProvider' if we
// have overlapping value objects
// -----------------------------------------------------------------------