} catch (IndexingFailure e) {
throw new AnnotationDefinitionResolutionException(resourceLocation,
e.getMessage());
}
AnnotationDefinition annotationDefinition = CommonModelFactory
.getInstance().createAnnotationDefinition(annotationHeader.
getAnnotationBlock().getKeyword());
annotationDefinition.setDescription(annotationHeader
.getAnnotationBlock().getDescriptionString());
annotationDefinition.setUsage(annotationHeader.getAnnotationBlock()
.getUsageString());
annotationDefinition.setType(annotationHeader.getAnnotationBlock()
.getAnnotationType());
annotationDefinition.setURL(resourceLocation);
long characterOffset = annotationHeaderProcessor
.getCharacterStopOffset();
try {
switch (annotationDefinition.getType()) {
case ENUMERATION:
annotationDefinition.setEnums(parseEnumData(
annotationCacheCopy,
annotationHeader.getProcessingBlock()
.getDelimiterString(),
characterOffset));
break;
case REGULAR_EXPRESSION:
annotationDefinition.setValue(parseRegularExpression(
annotationCacheCopy, characterOffset));
}
} catch (IOException e) {
throw new AnnotationDefinitionResolutionException(resourceLocation,
e.getMessage());