org.jetbrains.jet.codegen.state
Class JetTypeMapper

java.lang.Object
  extended by org.jetbrains.jet.codegen.binding.BindingContextAware
      extended by org.jetbrains.jet.codegen.binding.BindingTraceAware
          extended by org.jetbrains.jet.codegen.state.JetTypeMapper

public class JetTypeMapper
extends BindingTraceAware


Field Summary
 
Fields inherited from class org.jetbrains.jet.codegen.binding.BindingTraceAware
bindingTrace
 
Fields inherited from class org.jetbrains.jet.codegen.binding.BindingContextAware
bindingContext
 
Constructor Summary
JetTypeMapper(BindingTrace bindingTrace, ClassBuilderMode mode)
           
 
Method Summary
 org.jetbrains.asm4.Type expressionType(JetExpression expr)
           
 org.jetbrains.asm4.Type getOwner(DeclarationDescriptor descriptor, OwnerKind kind, boolean isInsideModule)
           
static java.util.List<DeclarationDescriptor> getPathWithoutRootNsAndModule(NamespaceDescriptor descriptor)
           
static java.lang.String getPropertyAccessorName(PropertyDescriptor descriptor, boolean isGetter)
           
 org.jetbrains.asm4.Type getSharedVarType(DeclarationDescriptor descriptor)
           
static boolean isAccessor(CallableMemberDescriptor descriptor)
           
 org.jetbrains.asm4.Type mapClass(ClassifierDescriptor classifier)
           
 JvmMethodSignature mapConstructorSignature(ConstructorDescriptor descriptor)
           
 JvmMethodSignature mapConstructorSignature(ConstructorDescriptor descriptor, CalculatedClosure closure)
           
 java.lang.String mapFieldSignature(JetType backingFieldType)
           
 JvmMethodSignature mapGetterSignature(PropertyDescriptor descriptor, OwnerKind kind)
           
 org.jetbrains.asm4.Type mapReturnType(JetType jetType)
           
 JvmMethodSignature mapScriptSignature(ScriptDescriptor script, java.util.List<ScriptDescriptor> importedScripts)
           
 JvmMethodSignature mapSetterSignature(PropertyDescriptor descriptor, OwnerKind kind)
           
 JvmMethodSignature mapSignature(FunctionDescriptor f)
           
 JvmMethodSignature mapSignature(FunctionDescriptor f, boolean needGenericSignature, OwnerKind kind)
           
 JvmMethodSignature mapSignature(Name functionName, FunctionDescriptor f)
           
 org.jetbrains.asm4.Type mapSupertype(JetType jetType, BothSignatureWriter signatureVisitor)
           
 CallableMethod mapToCallableMethod(ConstructorDescriptor descriptor)
           
 CallableMethod mapToCallableMethod(ConstructorDescriptor descriptor, CalculatedClosure closure)
           
 CallableMethod mapToCallableMethod(FunctionDescriptor functionDescriptor, boolean superCall, boolean isInsideClass, boolean isInsideModule, OwnerKind kind)
           
 CallableMethod mapToFunctionInvokeCallableMethod(FunctionDescriptor fd)
           
 org.jetbrains.asm4.Type mapTraitImpl(ClassDescriptor descriptor)
           
 org.jetbrains.asm4.Type mapType(ClassifierDescriptor classifierDescriptor)
           
 org.jetbrains.asm4.Type mapType(JetType jetType)
           
 org.jetbrains.asm4.Type mapType(JetType jetType, BothSignatureWriter signatureVisitor, org.jetbrains.jet.codegen.state.JetTypeMapper.JetTypeMapperMode kind, Variance howThisTypeIsUsed, boolean arrayParameter)
           
 org.jetbrains.asm4.Type mapType(VariableDescriptor variableDescriptor)
           
 void writeFormalTypeParameters(java.util.List<TypeParameterDescriptor> typeParameters, BothSignatureWriter signatureVisitor)
           
 
Methods inherited from class org.jetbrains.jet.codegen.binding.BindingTraceAware
getBindingTrace
 
Methods inherited from class org.jetbrains.jet.codegen.binding.BindingContextAware
getBindingContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JetTypeMapper

public JetTypeMapper(BindingTrace bindingTrace,
                     ClassBuilderMode mode)
Method Detail

getOwner

@NotNull
public org.jetbrains.asm4.Type getOwner(@NotNull
                                                DeclarationDescriptor descriptor,
                                                @NotNull
                                                OwnerKind kind,
                                                boolean isInsideModule)

getPathWithoutRootNsAndModule

@NotNull
public static java.util.List<DeclarationDescriptor> getPathWithoutRootNsAndModule(@NotNull
                                                                                          NamespaceDescriptor descriptor)

mapReturnType

@NotNull
public org.jetbrains.asm4.Type mapReturnType(@NotNull
                                                     JetType jetType)

mapSupertype

@NotNull
public org.jetbrains.asm4.Type mapSupertype(@NotNull
                                                    JetType jetType,
                                                    @Nullable
                                                    BothSignatureWriter signatureVisitor)

mapClass

@NotNull
public org.jetbrains.asm4.Type mapClass(@NotNull
                                                ClassifierDescriptor classifier)

mapType

@NotNull
public org.jetbrains.asm4.Type mapType(@NotNull
                                               JetType jetType)

mapType

@NotNull
public org.jetbrains.asm4.Type mapType(@NotNull
                                               VariableDescriptor variableDescriptor)

mapType

@NotNull
public org.jetbrains.asm4.Type mapType(@NotNull
                                               ClassifierDescriptor classifierDescriptor)

mapType

@NotNull
public org.jetbrains.asm4.Type mapType(@NotNull
                                               JetType jetType,
                                               @Nullable
                                               BothSignatureWriter signatureVisitor,
                                               @NotNull
                                               org.jetbrains.jet.codegen.state.JetTypeMapper.JetTypeMapperMode kind,
                                               @NotNull
                                               Variance howThisTypeIsUsed,
                                               boolean arrayParameter)

mapTraitImpl

@NotNull
public org.jetbrains.asm4.Type mapTraitImpl(@NotNull
                                                    ClassDescriptor descriptor)

mapToCallableMethod

@NotNull
public CallableMethod mapToCallableMethod(@NotNull
                                                  FunctionDescriptor functionDescriptor,
                                                  boolean superCall,
                                                  boolean isInsideClass,
                                                  boolean isInsideModule,
                                                  OwnerKind kind)

isAccessor

public static boolean isAccessor(@NotNull
                                 CallableMemberDescriptor descriptor)

mapSignature

@NotNull
public JvmMethodSignature mapSignature(@NotNull
                                               FunctionDescriptor f,
                                               boolean needGenericSignature,
                                               @NotNull
                                               OwnerKind kind)

mapSignature

@NotNull
public JvmMethodSignature mapSignature(@NotNull
                                               Name functionName,
                                               @NotNull
                                               FunctionDescriptor f)

mapSignature

@NotNull
public JvmMethodSignature mapSignature(@NotNull
                                               FunctionDescriptor f)

mapFieldSignature

@Nullable
public java.lang.String mapFieldSignature(@NotNull
                                                   JetType backingFieldType)

writeFormalTypeParameters

public void writeFormalTypeParameters(java.util.List<TypeParameterDescriptor> typeParameters,
                                      BothSignatureWriter signatureVisitor)

getPropertyAccessorName

@NotNull
public static java.lang.String getPropertyAccessorName(@NotNull
                                                               PropertyDescriptor descriptor,
                                                               boolean isGetter)

mapGetterSignature

@NotNull
public JvmMethodSignature mapGetterSignature(PropertyDescriptor descriptor,
                                                     OwnerKind kind)

mapSetterSignature

@NotNull
public JvmMethodSignature mapSetterSignature(PropertyDescriptor descriptor,
                                                     OwnerKind kind)

mapConstructorSignature

@NotNull
public JvmMethodSignature mapConstructorSignature(@NotNull
                                                          ConstructorDescriptor descriptor)

mapConstructorSignature

@NotNull
public JvmMethodSignature mapConstructorSignature(@NotNull
                                                          ConstructorDescriptor descriptor,
                                                          @Nullable
                                                          CalculatedClosure closure)

mapScriptSignature

@NotNull
public JvmMethodSignature mapScriptSignature(@NotNull
                                                     ScriptDescriptor script,
                                                     @NotNull
                                                     java.util.List<ScriptDescriptor> importedScripts)

mapToCallableMethod

@NotNull
public CallableMethod mapToCallableMethod(@NotNull
                                                  ConstructorDescriptor descriptor)

mapToCallableMethod

@NotNull
public CallableMethod mapToCallableMethod(@NotNull
                                                  ConstructorDescriptor descriptor,
                                                  @Nullable
                                                  CalculatedClosure closure)

getSharedVarType

public org.jetbrains.asm4.Type getSharedVarType(DeclarationDescriptor descriptor)

mapToFunctionInvokeCallableMethod

@NotNull
public CallableMethod mapToFunctionInvokeCallableMethod(@NotNull
                                                                FunctionDescriptor fd)

expressionType

@NotNull
public org.jetbrains.asm4.Type expressionType(JetExpression expr)