org.sonar.api.utils
Class AnnotationUtils

java.lang.Object
  extended by org.sonar.api.utils.AnnotationUtils

public final class AnnotationUtils
extends Object

A utility class for annotations

Since:
1.11

Method Summary
static
<A extends Annotation>
A
getAnnotation(Object objectOrClass, Class<A> annotationClass)
          Searches for a class annotation.
static
<A> A
getClassAnnotation(Object object, Class<A> annotationClass)
          Deprecated. As of 3.1, replaced by getAnnotation(Object,Class)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAnnotation

public static <A extends Annotation> A getAnnotation(Object objectOrClass,
                                                     Class<A> annotationClass)
Searches for a class annotation. All inheritance tree is analysed.

Since:
3.1

getClassAnnotation

@Deprecated
public static <A> A getClassAnnotation(Object object,
                                                  Class<A> annotationClass)
Deprecated. As of 3.1, replaced by getAnnotation(Object,Class)

Searches for a class annotation. All inheritance tree is analysed.



Copyright © 2009-2014 SonarSource. All Rights Reserved.