2525
2626package javax .lang .model .util ;
2727
28+ import org .checkerframework .checker .nullness .qual .Nullable ;
2829import org .checkerframework .dataflow .qual .Pure ;
30+ import org .checkerframework .framework .qual .AnnotatedFor ;
2931import java .lang .annotation .Annotation ;
3032import java .lang .annotation .AnnotationTypeMismatchException ;
3133import java .lang .annotation .IncompleteAnnotationException ;
4547 * @see javax.annotation.processing.ProcessingEnvironment#getTypeUtils
4648 * @since 1.6
4749 */
50+ @ AnnotatedFor ("nullness" )
4851public interface Types {
4952
5053 /**
@@ -56,7 +59,7 @@ public interface Types {
5659 * @param t the type to map to an element
5760 * @return the element corresponding to the given type
5861 */
59- Element asElement (TypeMirror t );
62+ @ Nullable Element asElement (TypeMirror t );
6063
6164 /**
6265 * Tests whether two {@code TypeMirror} objects represent the same type.
@@ -235,8 +238,8 @@ public interface Types {
235238 * @param superBound the super (lower) bound, or {@code null} if none
236239 * @throws IllegalArgumentException if bounds are not valid
237240 */
238- WildcardType getWildcardType (TypeMirror extendsBound ,
239- TypeMirror superBound );
241+ WildcardType getWildcardType (@ Nullable TypeMirror extendsBound ,
242+ @ Nullable TypeMirror superBound );
240243
241244 /**
242245 * {@return the type corresponding to a type element and
@@ -292,7 +295,7 @@ WildcardType getWildcardType(TypeMirror extendsBound,
292295 * type arguments are given, or if an inappropriate type
293296 * argument, type element, or containing type is provided
294297 */
295- DeclaredType getDeclaredType (DeclaredType containing ,
298+ DeclaredType getDeclaredType (@ Nullable DeclaredType containing ,
296299 TypeElement typeElem , TypeMirror ... typeArgs );
297300
298301 /**
0 commit comments