// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.lang.jvm;

import com.intellij.lang.jvm.annotation.JvmAnnotationAttribute;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public interface JvmAnnotation extends JvmElement {

  /**
   * Returns the fully qualified name of the annotation class.
   *
   * @return the class name, or null if the annotation is unresolved.
   */
  @Nullable
  @NonNls
  String getQualifiedName();

  @NotNull
  List<JvmAnnotationAttribute> getAttributes();
}

@@ -381,16 +381,80 @@
 .List;%0A%0A
+import static com.intellij.util.containers.ContainerUtil.find;%0A%0A
 public i
@@ -700,16 +700,783 @@
 ame();%0A%0A
+  /**%0A   * It method is preferable to %7B@link #findAttribute(String)%7D%0A   * because it allows to provide more efficient implementation.%0A   *%0A   * @return %7B@code true%7D if this annotation has an attribute with the specified name%0A   */%0A  default boolean hasAttribute(@NonNls @NotNull String attributeName) %7B%0A    return findAttribute(attributeName) != null;%0A  %7D%0A%0A  /**%0A   * This method is preferable to manual search in results of %7B@link #getAttributes()%7D%0A   * because it allows to provide more efficient implementation.%0A   *%0A   * @return attribute instance that%0A   */%0A  @Nullable%0A  default JvmAnnotationAttribute findAttribute(@NonNls @NotNull String attributeName) %7B%0A    return find(getAttributes(), attribute -%3E attributeName.equals(attribute.getAttributeName()));%0A  %7D%0A%0A
   @NotNu

add JvmAnnotation #hasAttribute and #findAttribute