void (Stage completedStage, Stage startingStage) { if (completedStage == Stage.RESOLVE_MAP_BUILDING_STAGE) { if (myDeclaredTargetRefs.size() > 0) { for (Iterator<String> it = myDeclaredTargetRefs.iterator(); it.hasNext();) { final String declaredRef = it.next(); final AntDomTarget result = getTargetByName(declaredRef); if (result != null) { myResult.add(declaredRef, Pair.create(result, declaredRef)); // treat declared name as effective name it.remove(); } } } stop(); } }