Create the AnnotationTypeElementDoc for a MethodSymbol.
Should be called only on symbols representing annotation type elements.
3598
protected void makeAnnotationTypeElementDoc(MethodSymbol meth, TreePath treePath) {
        AnnotationTypeElementDocImpl result =
            (AnnotationTypeElementDocImpl)methodMap.get(meth);
        if (result != null) {
            if (treePath != null) result.setTreePath(treePath);
        } else {
            result =
                new AnnotationTypeElementDocImpl(this, meth, treePath);
            methodMap.put(meth, result);
        }
    }
939459
public AnnotationTypeDoc annotationType() {
        ClassSymbol atsym = (ClassSymbol)annotation.type.tsym;
        if (annotation.type.isErroneous()) {
            env.warning(null, "javadoc.class_not_found", annotation.type.toString());
            return new AnnotationTypeDocImpl(env, atsym);
        } else {
            return (AnnotationTypeDoc)env.getClassDoc(atsym);
        }
    }
299165
def _generate_annotation_type_class(self, ns, annotation_type):
        # type: (ApiNamespace, AnnotationType) -> None
        """"""
        self.emit('class {}(object):'.format(class_name_for_annotation_type(annotation_type, ns)))
        with self.indent():
            self._generate_annotation_type_class_init(ns, annotation_type)
            self._generate_annotation_type_class_properties(ns, annotation_type)
        self.emit()
871145
public static AnnotationTypeBuilder getInstance(Context context,
            TypeElement annotationTypeDoc,
            AnnotationTypeWriter writer) {
        return new AnnotationTypeBuilder(context, annotationTypeDoc, writer);
    }
357280
public <A extends Annotation> A getMethodAnnotation(Class<A> annotationType) {
        return adaptAnnotation(getAnnotatedElement().getAnnotation(annotationType));
    }
311819
private void printMethodDeclaration(MethodDeclaration m, boolean isCompanionClass) {
    ExecutableElement methodElement = m.getExecutableElement();
    TypeElement typeElement = ElementUtil.getDeclaringClass(methodElement);

    if (typeElement.getKind().isInterface()) {
      // isCompanion and isStatic must be both false (i.e. this prints a non-static method decl
      // in @protocol) or must both be true (i.e. this prints a static method decl in the
      // companion class' @interface).
      if (isCompanionClass != ElementUtil.isStatic(methodElement)) {
        return;
      }
    }

    newline();
    JavadocGenerator.printDocComment(getBuilder(), m.getJavadoc());

    String methodSignature = getMethodSignature(m);

    // In order to properly map the method name from the entire signature, we must isolate it from
    // associated type and parameter declarations.  The method name is guaranteed to be between the
    // first closing parenthesis and first colon (for methods with arguments), or the entirety of
    // the declaration after the first closing parenthesis (for methods with no arguments).
    int identifierStartIndex = methodSignature.indexOf(')') + 1;
    int identifierEndIndex =
        methodSignature.contains(":") ? methodSignature.indexOf(':') : methodSignature.length();
    generatedSourceMappings.addMethodMapping(
        m /* methodDeclaration */,
        getBuilder().length() + identifierStartIndex /* targetBegin */,
        identifierEndIndex - identifierStartIndex /* length */);

    print(methodSignature);

    String methodName = nameTable.getMethodSelector(methodElement);
    if (!m.isConstructor() && NameTable.needsObjcMethodFamilyNoneAttribute(methodName)) {
      // Getting around a clang warning.
      // clang assumes that methods with names starting with new, alloc or copy
      // return objects of the same type as the receiving class, regardless of
      // the actual declared return type. This attribute tells clang to not do
      // that, please.
      // See http://clang.llvm.org/docs/AutomaticReferenceCounting.html
      // Sections 5.1 (Explicit method family control)
      // and 5.2.2 (Related result types)
      print(" OBJC_METHOD_FAMILY_NONE");
    }

    if (needsDeprecatedAttribute(m.getAnnotations())) {
      print(" " + DEPRECATED_ATTRIBUTE);
    }
    if (m.isUnavailable()) {
      print(" NS_UNAVAILABLE");
    }
    println(";");
  }
636803
public void buildMethodComments(XMLNode node, Content methodDocTree) {
        if (!configuration.nocomment) {
            ExecutableElement method = currentMethod;
            if (utils.getFullBody(currentMethod).isEmpty()) {
                DocFinder.Output docs = DocFinder.search(configuration,
                        new DocFinder.Input(utils, currentMethod));
                if (docs.inlineTags != null && !docs.inlineTags.isEmpty())
                        method = (ExecutableElement)docs.holder;
            }
            TypeMirror containingType = method.getEnclosingElement().asType();
            writer.addComments(containingType, method, methodDocTree);
        }
    }
341271
function createTypeAnnotationBasedOnTypeof(type) {
  if (type === "string") {
    return t.stringTypeAnnotation();
  } else if (type === "number") {
    return t.numberTypeAnnotation();
  } else if (type === "undefined") {
    return t.voidTypeAnnotation();
  } else if (type === "boolean") {
    return t.booleanTypeAnnotation();
  } else if (type === "function") {
    return t.genericTypeAnnotation(t.identifier("Function"));
  } else if (type === "object") {
    return t.genericTypeAnnotation(t.identifier("Object"));
  } else if (type === "symbol") {
    return t.genericTypeAnnotation(t.identifier("Symbol"));
  } else {
    throw new Error("Invalid typeof value");
  }
}
978451
public T annotationType(@NonNull AnnotationType annotationType) {
      this.annotationType.add(annotationType);
      return Cast.as(this);
   }
910129
public AbstractBuilder getAnnotationTypeFieldsBuilder(
            AnnotationTypeWriter annotationTypeWriter) {
        return AnnotationTypeFieldBuilder.getInstance(context,
                annotationTypeWriter.getAnnotationTypeElement(),
                writerFactory.getAnnotationTypeFieldWriter(annotationTypeWriter));
    }
273469
protected void makeConstructorDoc(MethodSymbol meth, TreePath treePath) {
        ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth);
        if (result != null) {
            if (treePath != null) result.setTreePath(treePath);
        } else {
            result = new ConstructorDocImpl(this, meth, treePath);
            methodMap.put(meth, result);
        }
    }
95738
private <T extends ProgramElementDoc> void mapAnnotations(Map<String,List<T>> map, Object doc,
            T holder) {
        AnnotationDesc[] annotations;
        boolean isPackage = false;
        if (doc instanceof ProgramElementDoc) {
            annotations = ((ProgramElementDoc) doc).annotations();
        } else if (doc instanceof PackageDoc) {
            annotations = ((PackageDoc) doc).annotations();
            isPackage = true;
        } else if (doc instanceof Parameter) {
            annotations = ((Parameter) doc).annotations();
        } else {
            throw new DocletAbortException("should not happen");
        }
        for (AnnotationDesc annotation : annotations) {
            AnnotationTypeDoc annotationDoc = annotation.annotationType();
            if (isPackage)
                refList(map, annotationDoc).add(holder);
            else
                add(map, annotationDoc, holder);
        }
    }
1111241
@Override
	public Method createJavaMethod() {
		Class<?> clazz = rtype.getClazz();
		String name = methodMember.getName();
		String methodDescriptor = methodMember.getDescriptor();

		ClassLoader classLoader = rtype.getTypeRegistry().getClassLoader();
		try {
			Class<?>[] params = Utils.toParamClasses(methodDescriptor, classLoader);
			Class<?> returnType = Utils.toClass(Type.getReturnType(methodDescriptor), classLoader);
			Class<?>[] exceptions = Utils.slashedNamesToClasses(methodMember.getExceptions(), classLoader);
			return JVM.newMethod(clazz, name, params, returnType, exceptions, methodMember.getModifiers(),
					methodMember.getGenericSignature());
		}
		catch (ClassNotFoundException e) {
			throw new IllegalStateException("Couldn't create j.l.r.Method for " + clazz.getName() + "."
					+ methodDescriptor, e);
		}
	}
1357659
public AnnotatedTypeBuilder<X> addToMethod(Method method, Annotation annotation) {
       if (methods.get(method) == null) {
           methods.put(method, new AnnotationBuilder());
       }
       methods.get(method).add(annotation);
       return this;
   }
530905
public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
		return getAnnotatedElement().getAnnotation(annotationType);
	}
316886
public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(ElementMatcher<? super TypeDescription> matcher) {
        return new AnnotationTypeMatcher<T>(matcher);
    }
502935
public boolean isDocumentedAnnotation(AnnotationTypeDoc annotationDoc) {
        for (AnnotationDesc anno : annotationDoc.annotations()) {
            if (anno.annotationType().qualifiedName().equals(
                    Documented.class.getName())) {
                return true;
            }
        }
        return false;
    }