Package org.sonar.java.resolve
Class TypeSubstitution
- java.lang.Object
-
- org.sonar.java.resolve.TypeSubstitution
-
public class TypeSubstitution extends Object
-
-
Constructor Summary
Constructors Constructor Description TypeSubstitution()TypeSubstitution(TypeSubstitution typeSubstitution)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeSubstitutionadd(TypeVariableJavaType typeVariableType, JavaType javaType)TypeSubstitutioncombine(TypeSubstitution source)Produce new substitution based on two substitutions using the same keys.booleanequals(Object obj)inthashCode()booleanisIdentity()booleanisUnchecked()intsize()JavaTypesubstitutedType(JavaType javaType)List<JavaType>substitutedTypes()List<Map.Entry<TypeVariableJavaType,JavaType>>substitutionEntries()List<TypeVariableJavaType>typeVariables()static TypeSubstitutionuncheckedTypeSubstitution()
-
-
-
Constructor Detail
-
TypeSubstitution
public TypeSubstitution()
-
TypeSubstitution
public TypeSubstitution(TypeSubstitution typeSubstitution)
-
-
Method Detail
-
isUnchecked
public boolean isUnchecked()
-
uncheckedTypeSubstitution
public static TypeSubstitution uncheckedTypeSubstitution()
-
substitutedType
@CheckForNull public JavaType substitutedType(JavaType javaType)
-
typeVariables
public List<TypeVariableJavaType> typeVariables()
-
substitutionEntries
public List<Map.Entry<TypeVariableJavaType,JavaType>> substitutionEntries()
-
add
public TypeSubstitution add(TypeVariableJavaType typeVariableType, JavaType javaType)
-
size
public int size()
-
isIdentity
public boolean isIdentity()
-
combine
public TypeSubstitution combine(TypeSubstitution source)
Produce new substitution based on two substitutions using the same keys. if this.substitution is: A -> S, B -> I and source.substitution is : A -> Y, B -> X, produces Y -> S, X -> I- Parameters:
source- the substitution which values will be used as keys.- Returns:
- combination of the two substitutions.
-
-