org.jetbrains.kotlin.js.translate.context
Class StaticContext

java.lang.Object
  extended by org.jetbrains.kotlin.js.translate.context.StaticContext

public final class StaticContext
extends java.lang.Object

Aggregates all the static parts of the context.


Nested Class Summary
static class StaticContext.ImportedModule
           
 
Method Summary
 void addClass(ClassDescriptor classDescriptor)
           
 void export(MemberDescriptor descriptor, boolean force)
           
static StaticContext generateStaticContext(BindingTrace bindingTrace, JsConfig config, ModuleDescriptor moduleDescriptor)
           
 BindingContext getBindingContext()
           
 BindingTrace getBindingTrace()
           
 java.util.List<DeclarationDescriptor> getClassOrConstructorClosure(MemberDescriptor descriptor)
           
 JsConfig getConfig()
           
 ModuleDescriptor getCurrentModule()
           
 java.util.List<JsStatement> getDeclarationStatements()
           
 java.util.Map<ClassDescriptor,java.util.List<DeferredCallSite>> getDeferredCallSites()
           
 JsFunction getFunctionWithScope(CallableDescriptor descriptor)
           
 java.util.Collection<StaticContext.ImportedModule> getImportedModules()
           
 JsName getInnerNameForDescriptor(DeclarationDescriptor descriptor)
           
 Intrinsics getIntrinsics()
           
 JsExpression getModuleExpressionFor(DeclarationDescriptor descriptor)
           
 JsName getNameForBackingField(PropertyDescriptor property)
           
 JsName getNameForDescriptor(DeclarationDescriptor descriptor)
           
 JsName getNameForObjectInstance(ClassDescriptor descriptor)
           
 Namer getNamer()
           
 NameSuggestion getNameSuggestion()
           
 JsProgram getProgram()
           
 JsNameRef getQualifiedReference(DeclarationDescriptor descriptor)
           
 JsNameRef getQualifiedReference(FqName packageFqName)
           
 JsFunction getRootFunction()
           
 JsScope getScopeForDescriptor(DeclarationDescriptor descriptor)
           
static java.lang.String getSuggestedName(DeclarationDescriptor descriptor)
           
 java.util.List<JsStatement> getTopLevelStatements()
           
 JsName importDeclaration(java.lang.String suggestedName, JsExpression declaration)
           
 boolean isBuiltinModule()
           
 void postProcess()
           
 void putClassOrConstructorClosure(MemberDescriptor localClass, java.util.List<DeclarationDescriptor> closure)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

generateStaticContext

public static StaticContext generateStaticContext(@NotNull
                                                  BindingTrace bindingTrace,
                                                  @NotNull
                                                  JsConfig config,
                                                  @NotNull
                                                  ModuleDescriptor moduleDescriptor)

getProgram

@NotNull
public JsProgram getProgram()

getBindingTrace

@NotNull
public BindingTrace getBindingTrace()

getBindingContext

@NotNull
public BindingContext getBindingContext()

getIntrinsics

@NotNull
public Intrinsics getIntrinsics()

getNamer

@NotNull
public Namer getNamer()

getImportedModules

@NotNull
public java.util.Collection<StaticContext.ImportedModule> getImportedModules()

getScopeForDescriptor

@NotNull
public JsScope getScopeForDescriptor(@NotNull
                                             DeclarationDescriptor descriptor)

getFunctionWithScope

@NotNull
public JsFunction getFunctionWithScope(@NotNull
                                               CallableDescriptor descriptor)

getQualifiedReference

@NotNull
public JsNameRef getQualifiedReference(@NotNull
                                               DeclarationDescriptor descriptor)

getQualifiedReference

@NotNull
public JsNameRef getQualifiedReference(@NotNull
                                               FqName packageFqName)

getNameForDescriptor

@NotNull
public JsName getNameForDescriptor(@NotNull
                                           DeclarationDescriptor descriptor)

getNameForBackingField

@NotNull
public JsName getNameForBackingField(@NotNull
                                             PropertyDescriptor property)

getInnerNameForDescriptor

@NotNull
public JsName getInnerNameForDescriptor(@NotNull
                                                DeclarationDescriptor descriptor)

getNameForObjectInstance

@NotNull
public JsName getNameForObjectInstance(@NotNull
                                               ClassDescriptor descriptor)

getConfig

@NotNull
public JsConfig getConfig()

importDeclaration

@NotNull
public JsName importDeclaration(@NotNull
                                        java.lang.String suggestedName,
                                        @NotNull
                                        JsExpression declaration)

getSuggestedName

@NotNull
public static java.lang.String getSuggestedName(@NotNull
                                                        DeclarationDescriptor descriptor)

getModuleExpressionFor

@Nullable
public JsExpression getModuleExpressionFor(@NotNull
                                                    DeclarationDescriptor descriptor)

putClassOrConstructorClosure

public void putClassOrConstructorClosure(@NotNull
                                         MemberDescriptor localClass,
                                         @NotNull
                                         java.util.List<DeclarationDescriptor> closure)

getClassOrConstructorClosure

@Nullable
public java.util.List<DeclarationDescriptor> getClassOrConstructorClosure(@NotNull
                                                                                   MemberDescriptor descriptor)

getDeferredCallSites

@NotNull
public java.util.Map<ClassDescriptor,java.util.List<DeferredCallSite>> getDeferredCallSites()

getRootFunction

@NotNull
public JsFunction getRootFunction()

getTopLevelStatements

@NotNull
public java.util.List<JsStatement> getTopLevelStatements()

getDeclarationStatements

@NotNull
public java.util.List<JsStatement> getDeclarationStatements()

addClass

public void addClass(@NotNull
                     ClassDescriptor classDescriptor)

export

public void export(@NotNull
                   MemberDescriptor descriptor,
                   boolean force)

getNameSuggestion

@NotNull
public NameSuggestion getNameSuggestion()

getCurrentModule

@NotNull
public ModuleDescriptor getCurrentModule()

postProcess

public void postProcess()

isBuiltinModule

public boolean isBuiltinModule()