|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PsiSubstitutor
Represents a mapping between type parameters and their values.
| Field Summary | |
|---|---|
static PsiSubstitutor |
EMPTY
Empty, or natural, substitutor. |
static PsiSubstitutor |
UNKNOWN
|
| Method Summary | |
|---|---|
java.util.Map<PsiTypeParameter,PsiType> |
getSubstitutionMap()
Returns the map from type parameters to types used for substution by this substitutor. |
boolean |
isValid()
Checks if all types which the substitutor can substitute are valid. |
PsiSubstitutor |
merge(PsiSubstitutor other)
Deprecated. use putAll(PsiSubstitutor) instead. |
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(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 occuring in type with their values. |
PsiType |
substitute(PsiTypeParameter typeParameter)
Returns a mapping that this substitutor contains for a given type parameter. |
PsiType |
substituteAndCapture(PsiType type)
Substitutes type parameters occuring in type with their values. |
PsiType |
substituteAndFullCapture(PsiType type)
Substitutes type parameters occuring in type with their values. |
| Field Detail |
|---|
static final PsiSubstitutor EMPTY
T,
substitues type T.
Example: consider class List<E>. this
inside class List has type List with EMPTY substitutor.
static final PsiSubstitutor UNKNOWN
| Method Detail |
|---|
@Nullable PsiType substitute(PsiTypeParameter typeParameter)
typeParameter - the parameter to return the mapping for.
null for a raw type.PsiType substitute(PsiType type)
type with their values.
If value for type parameter is null, appropriate erasure is returned.
- Parameters:
type - the type to substitute the type parameters for.
- Returns:
- the result of the substitution.
PsiType substituteAndCapture(PsiType type)
type with their values.
If value for type parameter is null, appropriate erasure is returned.
If value of a class type parameter is a wildcard type, captures it in PsiCapturedWildcardType
- Parameters:
type - the type to substitute the type parameters for.
- Returns:
- the result of the substitution.
PsiType substituteAndFullCapture(PsiType type)
type with their values.
If value for type parameter is null, appropriate erasure is returned.
If value of a type parameter is a wildcard type, captures it in PsiCapturedWildcardType
- Parameters:
type - the type to substitute the type parameters for.
- Returns:
- the result of the substitution.
PsiSubstitutor put(PsiTypeParameter classParameter,
PsiType mapping)
classParameter - the parameter which is mapped.mapping - the type to which the parameter is mapped.
PsiSubstitutor putAll(PsiClass parentClass,
PsiType[] mappings)
parentClass - the class whose parameters are mapped.mappings - the types to which the parameters are mapped.
PsiSubstitutor putAll(PsiSubstitutor another)
another - the substitutor to get the mappings from.
PsiSubstitutor merge(PsiSubstitutor other)
putAll(PsiSubstitutor) instead.
@NotNull java.util.Map<PsiTypeParameter,PsiType> getSubstitutionMap()
boolean isValid()
PsiType.isValid()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||