private void visitConstructorOrMethod(MethodNode node, int methodTarget) {
    visitAnnotations(node, methodTarget);
    for (int i = 0; i < node.getParameters().length; i++) {
      Parameter parameter = node.getParameters()[i];
      visitAnnotations(parameter, AnnotationNode.PARAMETER_TARGET);
    }

    if (this.currentClass.isAnnotationDefinition() && !node.isStaticConstructor()) {
      ErrorCollector errorCollector = new ErrorCollector(this.source.getConfiguration());
      AnnotationVisitor visitor = new AnnotationVisitor(this.source, errorCollector);
      visitor.setReportClass(currentClass);
      visitor.checkReturnType(node.getReturnType(), node);
      if (node.getParameters().length > 0) {
        addError("Annotation members may not have parameters.", node.getParameters()[0]);
      }
      if (node.getExceptions().length > 0) {
        addError("Annotation members may not have a throws clause.", node.getExceptions()[0]);
      }
      ReturnStatement code = (ReturnStatement) node.getCode();
      if (code != null) {
        visitor.visitExpression(node.getName(), code.getExpression(), node.getReturnType());
        visitor.checkCircularReference(currentClass, node.getReturnType(), code.getExpression());
      }
      this.source.getErrorCollector().addCollectorContents(errorCollector);
    }
  }
 /**
  * Resolve metadata and details of the annotation.
  *
  * @param unvisited the node to visit
  * @return the visited node
  */
 private AnnotationNode visitAnnotation(AnnotationNode unvisited) {
   ErrorCollector errorCollector = new ErrorCollector(this.source.getConfiguration());
   AnnotationVisitor visitor = new AnnotationVisitor(this.source, errorCollector);
   AnnotationNode visited = visitor.visit(unvisited);
   this.source.getErrorCollector().addCollectorContents(errorCollector);
   return visited;
 }