code: @Override
      public AnnotationDefinition resolveAnnotationDefinition(
              String resourceLocation)
              throws AnnotationDefinitionResolutionException {
          ResolvedResource resolveResource;
          try {
              resolveResource = resourceCache.resolveResource(
                      ANNOTATIONS, resourceLocation);
          } catch (ResourceDownloadError e) {
              throw new AnnotationDefinitionResolutionException(resourceLocation,
                      e.getMessage());
          }
          File annotationCacheCopy = resolveResource.getCacheResourceCopy();
  
          CachedResource cacheResource = cacheLookupService.findInCache(
                  ANNOTATIONS, resourceLocation);
  
          AnnotationHeaderProcessor annotationHeaderProcessor =
                  new AnnotationHeaderProcessor();
  
          AnnotationHeader annotationHeader;
          try {
              annotationHeader =
                      annotationHeaderProcessor
                              .processAnnotationHeader(resourceLocation,
                                      annotationCacheCopy,
                                      cacheResource
                                              .getLocalFile());
          } 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());
          }
  
          return annotationDefinition;
      }
docs: {@inheritDoc}