public final class EmptySubstitutor extends java.lang.Object implements PsiSubstitutor
PsiSubstitutor.EMPTYEMPTY, KEY, UNKNOWN| Constructor and Description |
|---|
EmptySubstitutor() |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureValid()
If this substitutor is not valid, throws an exception with some diagnostics
|
static EmptySubstitutor |
getInstance() |
java.util.Map<PsiTypeParameter,PsiType> |
getSubstitutionMap()
Returns the map from type parameters to types used for substitution by this substitutor.
|
boolean |
isValid()
Checks if all types which the substitutor can substitute are valid.
|
PsiSubstitutor |
put(PsiTypeParameter classParameter,
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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateSubstitutorpublic static EmptySubstitutor getInstance()
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 PsiSubstitutor put(PsiTypeParameter classParameter, PsiType mapping)
PsiSubstitutorput in interface PsiSubstitutorclassParameter - 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.util.Map<PsiTypeParameter,PsiType> getSubstitutionMap()
PsiSubstitutorgetSubstitutionMap in interface PsiSubstitutorpublic boolean isValid()
PsiSubstitutorisValid in interface PsiSubstitutorPsiType.isValid()public void ensureValid()
PsiSubstitutorensureValid in interface PsiSubstitutorpublic java.lang.String toString()
toString in class java.lang.Object