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)
PsiSubstitutor
substitute
in interface PsiSubstitutor
typeParameter
- the parameter to return the mapping for.null
for a raw type.public PsiType substitute(PsiType type)
PsiSubstitutor
type
with their values.
If value for type parameter is null
, appropriate erasure is returned.substitute
in interface PsiSubstitutor
type
- the type to substitute the type parameters for.public PsiType substituteWithBoundsPromotion(PsiTypeParameter typeParameter)
substituteWithBoundsPromotion
in interface PsiSubstitutor
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected PsiSubstitutorImpl clone()
clone
in class java.lang.Object
public PsiSubstitutor put(PsiTypeParameter typeParameter, PsiType mapping)
PsiSubstitutor
put
in interface PsiSubstitutor
typeParameter
- the parameter which is mapped.mapping
- the type to which the parameter is mapped.public PsiSubstitutor putAll(PsiClass parentClass, PsiType[] mappings)
PsiSubstitutor
putAll
in interface PsiSubstitutor
parentClass
- the class whose parameters are mapped.mappings
- the types to which the parameters are mapped.public PsiSubstitutor putAll(PsiSubstitutor another)
PsiSubstitutor
putAll
in interface PsiSubstitutor
another
- the substitutor to get the mappings from.public PsiSubstitutor putAll(java.util.Map<? extends PsiTypeParameter,? extends PsiType> map)
PsiSubstitutor
putAll
in interface PsiSubstitutor
map
- a map which contains additional mappingspublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isValid()
PsiSubstitutor
isValid
in interface PsiSubstitutor
PsiType.isValid()
public void ensureValid()
PsiSubstitutor
ensureValid
in interface PsiSubstitutor
public java.util.Map<PsiTypeParameter,PsiType> getSubstitutionMap()
PsiSubstitutor
getSubstitutionMap
in interface PsiSubstitutor
@Deprecated public static PsiSubstitutor createSubstitutor(java.util.Map<? extends PsiTypeParameter,? extends PsiType> map)
PsiSubstitutor.createSubstitutor(Map)
PsiSubstitutor
createSubstitutor
in interface PsiSubstitutor
map
- a map to create a substitutor from