public Annotations getMethodAnnotations(CstMethodRef method) {
    if (methodAnnotations == null) {
      return null;
    }

    for (MethodAnnotationStruct item : methodAnnotations) {
      if (item.getMethod().equals(method)) {
        return item.getAnnotations();
      }
    }

    return null;
  }
Gets the method annotations for a given method, if any. This is meant for use by debugging /
dumping code.

@param method {@code non-null;} the method
@return {@code null-ok;} the method annotations, if any
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/AnnotationsDirectoryItem.java