checkers.types
Class TypeFromElement

java.lang.Object
  extended by checkers.types.TypeFromElement

public class TypeFromElement
extends Object

A utility class used to extract the annotations from an element and inserts them into the elements type.


Constructor Summary
Constructor and Description
TypeFromElement()
           
 
Method Summary
Modifier and Type Method and Description
static void annotate(AnnotatedTypeMirror.AnnotatedDeclaredType type, TypeElement element)
          Extracts type annotations from the element and inserts them into the type of the element.
static void annotate(AnnotatedTypeMirror.AnnotatedExecutableType type, ExecutableElement element)
          Extracts type annotations from the element and inserts them into the type of the element.
static void annotate(AnnotatedTypeMirror type, Element element)
          Extracts type annotations from the element and inserts them into the type of the element.
static void annotate(AnnotatedTypeMirror type, VariableElement element)
          Extracts type annotations from the element and inserts them into the type of the element.
static void annotateSupers(List<AnnotatedTypeMirror.AnnotatedDeclaredType> supertypes, TypeElement element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeFromElement

public TypeFromElement()
Method Detail

annotate

public static void annotate(AnnotatedTypeMirror type,
                            Element element)
Extracts type annotations from the element and inserts them into the type of the element. The element could be one of: 1. TypeElement of a class or an interface 2. ExecutableElement of a method or a constructor 3. VariableElement of a field or a method parameter 4. TypeParameterElement of a method or a class type parameter


annotate

public static void annotate(AnnotatedTypeMirror type,
                            VariableElement element)
Extracts type annotations from the element and inserts them into the type of the element. the element needs to be that of a field

Parameters:
type - the type of the field
element - the element of a field

annotate

public static void annotate(AnnotatedTypeMirror.AnnotatedDeclaredType type,
                            TypeElement element)
Extracts type annotations from the element and inserts them into the type of the element. the element needs to be that of a class or an interface

Parameters:
type - the type of the class/interface
element - the element of a class/interface

annotateSupers

public static void annotateSupers(List<AnnotatedTypeMirror.AnnotatedDeclaredType> supertypes,
                                  TypeElement element)

annotate

public static void annotate(AnnotatedTypeMirror.AnnotatedExecutableType type,
                            ExecutableElement element)
Extracts type annotations from the element and inserts them into the type of the element. the element needs to be that of a method or a constructor.

Parameters:
type - the type of the method
element - the element of a method