Class ContainsInferenceVariable
java.lang.Object
org.checkerframework.framework.util.typeinference8.types.ContainsInferenceVariable
Helper class for determining if a type contains an inference variable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Set<TypeVariable>
getMentionedTypeVariables
(Collection<? extends TypeVariable> typeVariables, TypeMirror type) Returns the type variables intypeVariables
that appear intype
.static boolean
hasAnyTypeVariable
(Collection<? extends TypeVariable> typeVariables, TypeMirror type) Returns true iftype
contains any of the type variables intypeVariables
.
-
Method Details
-
hasAnyTypeVariable
public static boolean hasAnyTypeVariable(Collection<? extends TypeVariable> typeVariables, TypeMirror type) Returns true iftype
contains any of the type variables intypeVariables
.- Parameters:
typeVariables
- a collection of type variablestype
- a type to check- Returns:
- true if
type
contains any of the type variables intypeVariables
-
getMentionedTypeVariables
public static Set<TypeVariable> getMentionedTypeVariables(Collection<? extends TypeVariable> typeVariables, TypeMirror type) Returns the type variables intypeVariables
that appear intype
.- Parameters:
typeVariables
- a collection of type variablestype
- a type to check- Returns:
- the type variables in
typeVariables
that appear intype
-