public class PsiSubstitutorImpl extends java.lang.Object implements PsiSubstitutor
EMPTY, KEY, UNKNOWN| Modifier and Type | Method and Description |
|---|---|
protected PsiSubstitutorImpl |
clone() |
static PsiSubstitutor |
createSubstitutor(java.util.Map<? extends PsiTypeParameter,? extends PsiType> map)
Deprecated.
|
void |
ensureValid()
If this substitutor is not valid, throws an exception with some diagnostics
|
boolean |
equals(java.lang.Object o) |
java.util.Map<PsiTypeParameter,PsiType> |
getSubstitutionMap()
Returns the map from type parameters to types used for substitution by this substitutor.
|
int |
hashCode() |
boolean |
isValid()
Checks if all types which the substitutor can substitute are valid.
|
PsiSubstitutor |
put(PsiTypeParameter typeParameter,
PsiType mapping)
Creates a substitutor instance which provides the specified parameter to type mapping in addition
to mappings contained in this substitutor.
|
PsiSubstitutor |
putAll(java.util.Map<? extends PsiTypeParameter,? extends PsiType> map)
Creates a substitutor instance containing all mappings from this substitutor and the
specified map.
|
PsiSubstitutor |
putAll(PsiClass parentClass,
PsiType[] mappings)
Creates a substitutor instance which maps the type parameters of the specified class to the
specified types in addition to mappings contained in this substitutor.
|
PsiSubstitutor |
putAll(PsiSubstitutor another)
Creates a substitutor instance containing all mappings from this substitutor and the
specified substitutor.
|
PsiType |
substitute(PsiType type)
Substitutes type parameters occurring in
type with their values. |
PsiType |
substitute(PsiTypeParameter typeParameter)
Returns a mapping that this substitutor contains for a given type parameter.
|
PsiType |
substituteWithBoundsPromotion(PsiTypeParameter typeParameter) |
java.lang.String |
toString() |
public PsiType substitute(PsiTypeParameter typeParameter)
PsiSubstitutorsubstitute in interface PsiSubstitutortypeParameter - the parameter to return the mapping for.null for a raw type.public PsiType substitute(PsiType type)
PsiSubstitutortype with their values.
If value for type parameter is null, appropriate erasure is returned.substitute in interface PsiSubstitutortype - the type to substitute the type parameters for.public PsiType substituteWithBoundsPromotion(PsiTypeParameter typeParameter)
substituteWithBoundsPromotion in interface PsiSubstitutorpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected PsiSubstitutorImpl clone()
clone in class java.lang.Objectpublic PsiSubstitutor put(PsiTypeParameter typeParameter, PsiType mapping)
PsiSubstitutorput in interface PsiSubstitutortypeParameter - the parameter which is mapped.mapping - the type to which the parameter is mapped.public PsiSubstitutor putAll(PsiClass parentClass, PsiType[] mappings)
PsiSubstitutorputAll in interface PsiSubstitutorparentClass - the class whose parameters are mapped.mappings - the types to which the parameters are mapped.public PsiSubstitutor putAll(PsiSubstitutor another)
PsiSubstitutorputAll in interface PsiSubstitutoranother - the substitutor to get the mappings from.public PsiSubstitutor putAll(java.util.Map<? extends PsiTypeParameter,? extends PsiType> map)
PsiSubstitutorputAll in interface PsiSubstitutormap - a map which contains additional mappingspublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isValid()
PsiSubstitutorisValid in interface PsiSubstitutorPsiType.isValid()public void ensureValid()
PsiSubstitutorensureValid in interface PsiSubstitutorpublic java.util.Map<PsiTypeParameter,PsiType> getSubstitutionMap()
PsiSubstitutorgetSubstitutionMap in interface PsiSubstitutor@Deprecated public static PsiSubstitutor createSubstitutor(java.util.Map<? extends PsiTypeParameter,? extends PsiType> map)
PsiSubstitutor.createSubstitutor(Map)PsiSubstitutorcreateSubstitutor in interface PsiSubstitutormap - a map to create a substitutor from