if (!decp.getChild().isStarAnnotation()) decpToRepeat.add(decp);
}
}
for (Iterator i = declareAnnotationOnTypes.iterator(); i.hasNext();) {
DeclareAnnotation deca = (DeclareAnnotation)i.next();
boolean didSomething = doDeclareAnnotations(deca, sourceType,true);
if (didSomething) {
anyNewAnnotations = true;
} else {
if (!deca.getTypePattern().isStar()) decaToRepeat.add(deca);
}
}
// now lets loop over and over until we have done all we can
while ((anyNewAnnotations || anyNewParents) &&
(!decpToRepeat.isEmpty() || !decaToRepeat.isEmpty())) {
anyNewParents = anyNewAnnotations = false;
List forRemoval = new ArrayList();
for (Iterator i = decpToRepeat.iterator(); i.hasNext();) {
DeclareParents decp = (DeclareParents)i.next();
boolean didSomething = doDeclareParents(decp, sourceType);
if (didSomething) {
anyNewParents = true;
forRemoval.add(decp);
}
}
decpToRepeat.removeAll(forRemoval);
forRemoval = new ArrayList();
for (Iterator i = declareAnnotationOnTypes.iterator(); i.hasNext();) {
DeclareAnnotation deca = (DeclareAnnotation)i.next();
boolean didSomething = doDeclareAnnotations(deca, sourceType,false);
if (didSomething) {
anyNewAnnotations = true;
forRemoval.add(deca);
}