code: private Type extractContainingType(Attribute.Compound ca,
                                         DiagnosticPosition pos,
                                         TypeSymbol annoDecl)
      {
          // The next three checks check that the Repeatable annotation
          // on the declaration of the annotation type that is repeating is
          // valid.
  
          // Repeatable must have at least one element
          if (ca.values.isEmpty()) {
              log.error(pos, "invalid.repeatable.annotation", annoDecl);
              return null;
          }
          Pair<MethodSymbol,Attribute> p = ca.values.head;
          Name name = p.fst.name;
          if (name != names.value) { // should contain only one element, named "value"
              log.error(pos, "invalid.repeatable.annotation", annoDecl);
              return null;
          }
          if (!(p.snd instanceof Attribute.Class)) { // check that the value of "value" is an Attribute.Class
              log.error(pos, "invalid.repeatable.annotation", annoDecl);
              return null;
          }
  
          return ((Attribute.Class)p.snd).getValue();
      }
docs: Extract the actual Type to be used for a containing annotation.