org.jetbrains.jet.lang.resolve.lazy
Class LazyImportScope

java.lang.Object
  extended by org.jetbrains.jet.lang.resolve.lazy.LazyImportScope
All Implemented Interfaces:
LazyEntity, JetScope

public class LazyImportScope
extends java.lang.Object
implements JetScope, LazyEntity


Field Summary
 
Fields inherited from interface org.jetbrains.jet.lang.resolve.scopes.JetScope
EMPTY
 
Constructor Summary
LazyImportScope(ResolveSession resolveSession, PackageViewDescriptor packageDescriptor, java.util.List<JetImportDirective> imports, BindingTrace traceForImportResolve, java.lang.String debugName, boolean inRootPackage)
           
 
Method Summary
static LazyImportScope createImportScopeForFile(ResolveSession resolveSession, PackageViewDescriptor packageDescriptor, JetFile jetFile, BindingTrace traceForImportResolve, java.lang.String debugName)
           
 void forceResolveAllContents()
           
 void forceResolveImportDirective(JetImportDirective importDirective)
           
 java.util.Collection<DeclarationDescriptor> getAllDescriptors()
          All visible descriptors from current scope.
 ClassifierDescriptor getClassifier(Name name)
          Should not return object (class object or enum entry) class descriptors.
 DeclarationDescriptor getContainingDeclaration()
           
 java.util.Collection<DeclarationDescriptor> getDeclarationsByLabel(LabelName labelName)
           
 java.util.Collection<FunctionDescriptor> getFunctions(Name name)
           
 java.util.List<ReceiverParameterDescriptor> getImplicitReceiversHierarchy()
          Adds receivers to the list in order of locality, so that the closest (the most local) receiver goes first
 VariableDescriptor getLocalVariable(Name name)
           
 java.util.Collection<DeclarationDescriptor> getOwnDeclaredDescriptors()
           
 PackageViewDescriptor getPackage(Name name)
           
 java.util.Collection<VariableDescriptor> getProperties(Name name)
           
 void printScopeStructure(Printer p)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyImportScope

public LazyImportScope(@NotNull
                       ResolveSession resolveSession,
                       @NotNull
                       PackageViewDescriptor packageDescriptor,
                       @NotNull
                       java.util.List<JetImportDirective> imports,
                       @NotNull
                       BindingTrace traceForImportResolve,
                       @NotNull
                       java.lang.String debugName,
                       boolean inRootPackage)
Method Detail

createImportScopeForFile

public static LazyImportScope createImportScopeForFile(@NotNull
                                                       ResolveSession resolveSession,
                                                       @NotNull
                                                       PackageViewDescriptor packageDescriptor,
                                                       @NotNull
                                                       JetFile jetFile,
                                                       @NotNull
                                                       BindingTrace traceForImportResolve,
                                                       @NotNull
                                                       java.lang.String debugName)

forceResolveAllContents

public void forceResolveAllContents()
Specified by:
forceResolveAllContents in interface LazyEntity

forceResolveImportDirective

public void forceResolveImportDirective(@NotNull
                                        JetImportDirective importDirective)

getClassifier

@Nullable
public ClassifierDescriptor getClassifier(@NotNull
                                                   Name name)
Description copied from interface: JetScope
Should not return object (class object or enum entry) class descriptors.

Specified by:
getClassifier in interface JetScope

getPackage

@Nullable
public PackageViewDescriptor getPackage(@NotNull
                                                 Name name)
Specified by:
getPackage in interface JetScope

getProperties

@NotNull
public java.util.Collection<VariableDescriptor> getProperties(@NotNull
                                                                      Name name)
Specified by:
getProperties in interface JetScope

getLocalVariable

@Nullable
public VariableDescriptor getLocalVariable(@NotNull
                                                    Name name)
Specified by:
getLocalVariable in interface JetScope

getFunctions

@NotNull
public java.util.Collection<FunctionDescriptor> getFunctions(@NotNull
                                                                     Name name)
Specified by:
getFunctions in interface JetScope

getContainingDeclaration

@NotNull
public DeclarationDescriptor getContainingDeclaration()
Specified by:
getContainingDeclaration in interface JetScope

getDeclarationsByLabel

@NotNull
public java.util.Collection<DeclarationDescriptor> getDeclarationsByLabel(@NotNull
                                                                                  LabelName labelName)
Specified by:
getDeclarationsByLabel in interface JetScope

getAllDescriptors

@NotNull
public java.util.Collection<DeclarationDescriptor> getAllDescriptors()
Description copied from interface: JetScope
All visible descriptors from current scope.

Specified by:
getAllDescriptors in interface JetScope
Returns:
All visible descriptors from current scope.

getImplicitReceiversHierarchy

@NotNull
public java.util.List<ReceiverParameterDescriptor> getImplicitReceiversHierarchy()
Description copied from interface: JetScope
Adds receivers to the list in order of locality, so that the closest (the most local) receiver goes first

Specified by:
getImplicitReceiversHierarchy in interface JetScope

getOwnDeclaredDescriptors

@NotNull
public java.util.Collection<DeclarationDescriptor> getOwnDeclaredDescriptors()
Specified by:
getOwnDeclaredDescriptors in interface JetScope

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

printScopeStructure

@TestOnly
public void printScopeStructure(@NotNull
                                         Printer p)
Specified by:
printScopeStructure in interface JetScope