checkers.util
Class QualifierDefaults

java.lang.Object
  extended by checkers.util.QualifierDefaults

public class QualifierDefaults
extends Object

Determines the default qualifiers on a type. Default qualifiers are specified via the DefaultQualifier annotation.

See Also:
DefaultQualifier

Constructor Summary
Constructor and Description
QualifierDefaults(AnnotatedTypeFactory factory, AnnotationUtils annoFactory)
           
 
Method Summary
Modifier and Type Method and Description
 void annotate(Element elt, AnnotatedTypeMirror type)
          Applies default annotations to a type given an Element.
 void annotate(Tree tree, AnnotatedTypeMirror type)
          Applies default annotations to a type given a Tree.
 void annotateTypeElement(TypeElement elt, AnnotatedTypeMirror type)
           
 void setAbsoluteDefaults(AnnotationMirror absoluteDefaultAnno, Set<DefaultLocation> locations)
          Sets the default annotation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QualifierDefaults

public QualifierDefaults(AnnotatedTypeFactory factory,
                         AnnotationUtils annoFactory)
Parameters:
factory - the factory for this checker
annoFactory - an annotation factory, used to get annotations by name
Method Detail

setAbsoluteDefaults

public void setAbsoluteDefaults(AnnotationMirror absoluteDefaultAnno,
                                Set<DefaultLocation> locations)
Sets the default annotation. A programmer may override this by writing the @DefaultQualifier annotation.


annotateTypeElement

public void annotateTypeElement(TypeElement elt,
                                AnnotatedTypeMirror type)

annotate

public void annotate(Element elt,
                     AnnotatedTypeMirror type)
Applies default annotations to a type given an Element.

Parameters:
elt - the element from which the type was obtained
type - the type to annotate

annotate

public void annotate(Tree tree,
                     AnnotatedTypeMirror type)
Applies default annotations to a type given a Tree.

Parameters:
tree - the tree from which the type was obtained
type - the type to annotate