} else if (declareDecl instanceof DeclareErrorOrWarning) {
DeclareErrorOrWarning dd = (DeclareErrorOrWarning) declareDecl;
annotation = AtAspectJAnnotationFactory
.createDeclareErrorOrWarningAnnotation(dd.getPointcut().toString(),dd.getMessage(),dd.isError(),declarationSourceStart);
} else if (declareDecl instanceof DeclareParents) {
DeclareParents dp = (DeclareParents) declareDecl;
String childPattern = dp.getChild().toString();
Collection parentPatterns = dp.getParents().getExactTypes();
StringBuffer parents = new StringBuffer();
for (Iterator iter = parentPatterns.iterator(); iter.hasNext();) {
UnresolvedType urt = ((UnresolvedType) iter.next());
parents.append(urt.getName());
if (iter.hasNext()) parents.append(", ");
}
annotation = AtAspectJAnnotationFactory
.createDeclareParentsAnnotation(childPattern,parents.toString(),dp.isExtends(),declarationSourceStart);
} else if (declareDecl instanceof DeclarePrecedence) {
DeclarePrecedence dp = (DeclarePrecedence) declareDecl;
String precedenceList = dp.getPatterns().toString();
annotation = AtAspectJAnnotationFactory.createDeclarePrecedenceAnnotation(precedenceList,declarationSourceStart);
} else if (declareDecl instanceof DeclareSoft) {
DeclareSoft ds = (DeclareSoft) declareDecl;
annotation = AtAspectJAnnotationFactory
.createDeclareSoftAnnotation(ds.getPointcut().toString(),ds.getException().getExactType().getName(),declarationSourceStart);