de.unisaarland.cs.st.jerify.verifier.helpers.annotationValueVisitors
Class AnnotationHelper

java.lang.Object
  extended by de.unisaarland.cs.st.jerify.verifier.helpers.annotationValueVisitors.AnnotationHelper

public final class AnnotationHelper
extends java.lang.Object

Helper methods that help with annotation handling

Author:
Daniel Wand (typestate@ewand.de)

Constructor Summary
AnnotationHelper()
           
 
Method Summary
static javax.lang.model.element.AnnotationMirror getAnnotation(checkers.types.AnnotatedTypeMirror type, java.lang.String annotationName)
          Get an AnnotationMirror by its name
static java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotationMirrorList(javax.lang.model.element.AnnotationValue a)
          Convert an AnnotationValue to a List
static java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotationValue_AnnotationMirrorList(javax.lang.model.element.AnnotationMirror am, java.lang.String key)
          Get the AnnotationValue named like key and convert it to a List
static java.lang.Integer getAnnotationValue_Int(javax.lang.model.element.AnnotationMirror am, java.lang.String key)
          Get the AnnotationValue named like key and convert it to an Integer
static java.util.List<java.lang.Integer> getAnnotationValue_IntList(javax.lang.model.element.AnnotationMirror am, java.lang.String key)
          Get the AnnotationValue named like key and convert it to a List
static java.lang.String getAnnotationValue_String(javax.lang.model.element.AnnotationMirror am, java.lang.String key)
          Get the AnnotationValue named like key and convert it to a String
static java.util.List<java.lang.String> getAnnotationValue_StringList(javax.lang.model.element.AnnotationMirror am, java.lang.String key)
          Get the AnnotationValue named like key and convert it to a List
static java.lang.Integer getInt(javax.lang.model.element.AnnotationValue a)
          Convert an AnnotationValue to an Integer
static java.util.List<java.lang.Integer> getIntList(javax.lang.model.element.AnnotationValue a)
          Convert an AnnotationValue to a List
static java.lang.String getString(javax.lang.model.element.AnnotationValue a)
          Convert an AnnotationValue to a String
static java.util.List<java.lang.String> getStringList(javax.lang.model.element.AnnotationValue a)
          Convert an AnnotationValue to a List
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationHelper

public AnnotationHelper()
Method Detail

getAnnotation

public static final javax.lang.model.element.AnnotationMirror getAnnotation(checkers.types.AnnotatedTypeMirror type,
                                                                            java.lang.String annotationName)
Get an AnnotationMirror by its name


getIntList

public static final java.util.List<java.lang.Integer> getIntList(javax.lang.model.element.AnnotationValue a)
Convert an AnnotationValue to a List


getInt

public static final java.lang.Integer getInt(javax.lang.model.element.AnnotationValue a)
Convert an AnnotationValue to an Integer


getStringList

public static final java.util.List<java.lang.String> getStringList(javax.lang.model.element.AnnotationValue a)
Convert an AnnotationValue to a List


getString

public static final java.lang.String getString(javax.lang.model.element.AnnotationValue a)
Convert an AnnotationValue to a String


getAnnotationMirrorList

public static final java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotationMirrorList(javax.lang.model.element.AnnotationValue a)
Convert an AnnotationValue to a List


getAnnotationValue_AnnotationMirrorList

public static final java.util.List<javax.lang.model.element.AnnotationMirror> getAnnotationValue_AnnotationMirrorList(javax.lang.model.element.AnnotationMirror am,
                                                                                                                      java.lang.String key)
Get the AnnotationValue named like key and convert it to a List


getAnnotationValue_String

public static final java.lang.String getAnnotationValue_String(javax.lang.model.element.AnnotationMirror am,
                                                               java.lang.String key)
Get the AnnotationValue named like key and convert it to a String


getAnnotationValue_StringList

public static final java.util.List<java.lang.String> getAnnotationValue_StringList(javax.lang.model.element.AnnotationMirror am,
                                                                                   java.lang.String key)
Get the AnnotationValue named like key and convert it to a List


getAnnotationValue_IntList

public static final java.util.List<java.lang.Integer> getAnnotationValue_IntList(javax.lang.model.element.AnnotationMirror am,
                                                                                 java.lang.String key)
Get the AnnotationValue named like key and convert it to a List


getAnnotationValue_Int

public static final java.lang.Integer getAnnotationValue_Int(javax.lang.model.element.AnnotationMirror am,
                                                             java.lang.String key)
Get the AnnotationValue named like key and convert it to an Integer