org.jetbrains.jet.lang.types
Class TypeSubstitutor

java.lang.Object
  extended by org.jetbrains.jet.lang.types.TypeSubstitutor

public class TypeSubstitutor
extends java.lang.Object


Nested Class Summary
static class TypeSubstitutor.MapToTypeSubstitutionAdapter
           
 
Field Summary
static TypeSubstitutor EMPTY
           
 
Constructor Summary
protected TypeSubstitutor(TypeSubstitution substitution)
           
 
Method Summary
static TypeSubstitutor create(JetType context)
           
static TypeSubstitutor create(java.util.Map<TypeConstructor,TypeProjection> substitutionContext)
           
static TypeSubstitutor create(TypeSubstitution... substitutions)
           
static TypeSubstitutor create(TypeSubstitution substitution)
           
static TypeSubstitutor createUnsafe(java.util.Map<TypeConstructor,TypeProjection> substitutionContext)
          No assertion for immediate recursion
 TypeSubstitution getSubstitution()
           
 boolean inRange(TypeConstructor typeConstructor)
           
 boolean isEmpty()
           
 JetType safeSubstitute(JetType type, Variance howThisTypeIsUsed)
           
 JetType substitute(JetType type, Variance howThisTypeIsUsed)
           
 TypeProjection substitute(TypeProjection typeProjection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final TypeSubstitutor EMPTY
Constructor Detail

TypeSubstitutor

protected TypeSubstitutor(@NotNull
                          TypeSubstitution substitution)
Method Detail

create

public static TypeSubstitutor create(@NotNull
                                     TypeSubstitution substitution)

create

public static TypeSubstitutor create(@NotNull
                                     TypeSubstitution... substitutions)

createUnsafe

public static TypeSubstitutor createUnsafe(@NotNull
                                           java.util.Map<TypeConstructor,TypeProjection> substitutionContext)
No assertion for immediate recursion


create

public static TypeSubstitutor create(@NotNull
                                     java.util.Map<TypeConstructor,TypeProjection> substitutionContext)

create

public static TypeSubstitutor create(@NotNull
                                     JetType context)

inRange

public boolean inRange(@NotNull
                       TypeConstructor typeConstructor)

isEmpty

public boolean isEmpty()

getSubstitution

@NotNull
public TypeSubstitution getSubstitution()

safeSubstitute

@NotNull
public JetType safeSubstitute(@NotNull
                                      JetType type,
                                      @NotNull
                                      Variance howThisTypeIsUsed)

substitute

@Nullable
public JetType substitute(@NotNull
                                   JetType type,
                                   @NotNull
                                   Variance howThisTypeIsUsed)

substitute

@Nullable
public TypeProjection substitute(@NotNull
                                          TypeProjection typeProjection)