code: private Type getContainingType(Attribute.Compound currentAnno,
              DiagnosticPosition pos,
              boolean reportError)
      {
          Type origAnnoType = currentAnno.type;
          TypeSymbol origAnnoDecl = origAnnoType.tsym;
  
          // Fetch the Repeatable annotation from the current
          // annotation's declaration, or null if it has none
          Attribute.Compound ca = origAnnoDecl.attribute(syms.repeatableType.tsym);
          if (ca == null) { // has no Repeatable annotation
              if (reportError)
                  log.error(pos, "duplicate.annotation.missing.container", origAnnoType, syms.repeatableType);
              return null;
          }
  
          return filterSame(extractContainingType(ca, pos, origAnnoDecl),
                            origAnnoType);
      }
docs: Fetches the actual Type that should be the containing annotation.