checkers.types
Class AnnotationFactory

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

@Default(value="checkers.nonnull.quals.NonNull")
public class AnnotationFactory
extends Object

Creates new annotations as AnnotationMirrors that may be added to AnnotatedTypeMirrors.


Constructor Summary
AnnotationFactory(ProcessingEnvironment env)
          Creates an annotation factory.
 
Method Summary
 AnnotationMirror fromClass(Class<?> clazz)
           
 AnnotationMirror fromName(CharSequence name)
          Creates an AnnotationMirror given by a particular fully-qualified name.
protected  DeclaredType typeFromName(CharSequence name)
          A utility method that converts a CharSequence (usually a String) into a TypeMirror named thereby.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationFactory

public AnnotationFactory(ProcessingEnvironment env)
Creates an annotation factory.

Parameters:
env - the ProcessingEnvironment for this factory
Method Detail

fromName

public AnnotationMirror fromName(CharSequence name)
Creates an AnnotationMirror given by a particular fully-qualified name.

Parameters:
name - the name of the annotation to create
Returns:
an AnnotationMirror of type name, or null if name does not correspond to an annotation type

fromClass

public AnnotationMirror fromClass(Class<?> clazz)

typeFromName

protected DeclaredType typeFromName(CharSequence name)
A utility method that converts a CharSequence (usually a String) into a TypeMirror named thereby.

Parameters:
name - the name of a type
Returns:
the TypeMirror corresponding to that name