Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/java.compiler/share/classes/javax/lang/model/util/Types.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

package javax.lang.model.util;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.dataflow.qual.Pure;
import org.checkerframework.framework.qual.AnnotatedFor;
import java.lang.annotation.Annotation;
import java.lang.annotation.AnnotationTypeMismatchException;
import java.lang.annotation.IncompleteAnnotationException;
Expand All @@ -45,6 +47,7 @@
* @see javax.annotation.processing.ProcessingEnvironment#getTypeUtils
* @since 1.6
*/
@AnnotatedFor("nullness")
public interface Types {

/**
Expand All @@ -56,7 +59,7 @@ public interface Types {
* @param t the type to map to an element
* @return the element corresponding to the given type
*/
Element asElement(TypeMirror t);
@Nullable Element asElement(TypeMirror t);

/**
* Tests whether two {@code TypeMirror} objects represent the same type.
Expand Down Expand Up @@ -235,8 +238,8 @@ public interface Types {
* @param superBound the super (lower) bound, or {@code null} if none
* @throws IllegalArgumentException if bounds are not valid
*/
WildcardType getWildcardType(TypeMirror extendsBound,
TypeMirror superBound);
WildcardType getWildcardType(@Nullable TypeMirror extendsBound,
@Nullable TypeMirror superBound);

/**
* {@return the type corresponding to a type element and
Expand Down Expand Up @@ -292,7 +295,7 @@ WildcardType getWildcardType(TypeMirror extendsBound,
* type arguments are given, or if an inappropriate type
* argument, type element, or containing type is provided
*/
DeclaredType getDeclaredType(DeclaredType containing,
DeclaredType getDeclaredType(@Nullable DeclaredType containing,
TypeElement typeElem, TypeMirror... typeArgs);

/**
Expand Down