org.jetbrains.jet.lang.resolve.lazy.descriptors
Class AbstractLazyMemberScope<D extends DeclarationDescriptor,DP extends DeclarationProvider>

java.lang.Object
  extended by org.jetbrains.jet.lang.resolve.lazy.descriptors.AbstractLazyMemberScope<D,DP>
All Implemented Interfaces:
JetScope
Direct Known Subclasses:
LazyClassMemberScope, LazyPackageMemberScope

public abstract class AbstractLazyMemberScope<D extends DeclarationDescriptor,DP extends DeclarationProvider>
extends java.lang.Object
implements JetScope


Field Summary
protected  DP declarationProvider
           
protected  ResolveSession resolveSession
           
protected  D thisDescriptor
           
protected  BindingTrace trace
           
 
Fields inherited from interface org.jetbrains.jet.lang.resolve.scopes.JetScope
EMPTY
 
Constructor Summary
protected AbstractLazyMemberScope(ResolveSession resolveSession, DP declarationProvider, D thisDescriptor, BindingTrace trace)
           
 
Method Summary
protected abstract  java.util.Collection<DeclarationDescriptor> computeExtraDescriptors()
           
 java.util.Set<VariableDescriptor> doGetProperties(Name name)
           
 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.Set<FunctionDescriptor> getFunctions(Name name)
           
protected abstract  ReceiverParameterDescriptor getImplicitReceiver()
           
 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)
           
protected abstract  void getNonDeclaredFunctions(Name name, java.util.Set<FunctionDescriptor> result)
           
protected abstract  void getNonDeclaredProperties(Name name, java.util.Set<VariableDescriptor> result)
           
 java.util.Collection<DeclarationDescriptor> getOwnDeclaredDescriptors()
           
 java.util.Set<VariableDescriptor> getProperties(Name name)
           
protected abstract  JetScope getScopeForMemberDeclarationResolution(JetDeclaration declaration)
           
 void printScopeStructure(Printer p)
           
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jetbrains.jet.lang.resolve.scopes.JetScope
getPackage
 

Field Detail

resolveSession

protected final ResolveSession resolveSession

trace

protected final BindingTrace trace

declarationProvider

protected final DP extends DeclarationProvider declarationProvider

thisDescriptor

protected final D extends DeclarationDescriptor thisDescriptor
Constructor Detail

AbstractLazyMemberScope

protected AbstractLazyMemberScope(@NotNull
                                  ResolveSession resolveSession,
                                  @NotNull
                                  DP declarationProvider,
                                  @NotNull
                                  D thisDescriptor,
                                  @NotNull
                                  BindingTrace trace)
Method Detail

getClassifier

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

getFunctions

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

getScopeForMemberDeclarationResolution

@NotNull
protected abstract JetScope getScopeForMemberDeclarationResolution(JetDeclaration declaration)

getNonDeclaredFunctions

protected abstract void getNonDeclaredFunctions(@NotNull
                                                Name name,
                                                @NotNull
                                                java.util.Set<FunctionDescriptor> result)

getProperties

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

doGetProperties

@NotNull
public java.util.Set<VariableDescriptor> doGetProperties(@NotNull
                                                                 Name name)

getNonDeclaredProperties

protected abstract void getNonDeclaredProperties(@NotNull
                                                 Name name,
                                                 @NotNull
                                                 java.util.Set<VariableDescriptor> result)

getLocalVariable

public VariableDescriptor getLocalVariable(@NotNull
                                           Name name)
Specified by:
getLocalVariable 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.

computeExtraDescriptors

@NotNull
protected abstract java.util.Collection<DeclarationDescriptor> computeExtraDescriptors()

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

getImplicitReceiver

@Nullable
protected abstract ReceiverParameterDescriptor getImplicitReceiver()

toString

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

getOwnDeclaredDescriptors

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

printScopeStructure

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