org.jetbrains.jet.lang.resolve.scopes
Class WritableScopeWithImports

java.lang.Object
  extended by org.jetbrains.jet.lang.resolve.scopes.AbstractScopeAdapter
      extended by org.jetbrains.jet.lang.resolve.scopes.JetScopeAdapter
          extended by org.jetbrains.jet.lang.resolve.scopes.WritableScopeWithImports
All Implemented Interfaces:
JetScope, WritableScope
Direct Known Subclasses:
WritableScopeImpl, WriteThroughScope

public abstract class WritableScopeWithImports
extends JetScopeAdapter
implements WritableScope


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jetbrains.jet.lang.resolve.scopes.WritableScope
WritableScope.LockLevel
 
Field Summary
protected  RedeclarationHandler redeclarationHandler
           
 
Fields inherited from interface org.jetbrains.jet.lang.resolve.scopes.JetScope
EMPTY
 
Constructor Summary
WritableScopeWithImports(JetScope scope, RedeclarationHandler redeclarationHandler, java.lang.String debugName)
           
 
Method Summary
 WritableScope changeLockLevel(WritableScope.LockLevel lockLevel)
           
protected  void checkMayNotWrite()
           
protected  void checkMayRead()
           
protected  void checkMayWrite()
           
 void clearImports()
           
protected  java.util.List<ReceiverParameterDescriptor> computeImplicitReceiversHierarchy()
           
 ClassifierDescriptor getClassifier(Name name)
          Should not return object (class object or enum entry) class descriptors.
 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
protected  java.util.List<JetScope> getImports()
           
 VariableDescriptor getLocalVariable(Name name)
           
 NamespaceDescriptor getNamespace(Name name)
           
 ClassDescriptor getObjectDescriptor(Name name)
           
 java.util.Set<VariableDescriptor> getProperties(Name name)
           
 void importClassifierAlias(Name importedClassifierName, ClassifierDescriptor classifierDescriptor)
           
 void importFunctionAlias(Name aliasName, FunctionDescriptor functionDescriptor)
           
 void importNamespaceAlias(Name aliasName, NamespaceDescriptor namespaceDescriptor)
           
 void importScope(JetScope imported)
           
 void importVariableAlias(Name aliasName, VariableDescriptor variableDescriptor)
           
 java.lang.String toString()
           
 
Methods inherited from class org.jetbrains.jet.lang.resolve.scopes.JetScopeAdapter
getWorkerScope
 
Methods inherited from class org.jetbrains.jet.lang.resolve.scopes.AbstractScopeAdapter
getAllDescriptors, getContainingDeclaration, getDeclarationsByLabel, getObjectDescriptors, getOwnDeclaredDescriptors, getPropertyByFieldReference
 
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.WritableScope
addClassifierAlias, addClassifierDescriptor, addFunctionAlias, addFunctionDescriptor, addLabeledDeclaration, addNamespace, addNamespaceAlias, addObjectDescriptor, addPropertyDescriptor, addTypeParameterDescriptor, addVariableAlias, addVariableDescriptor, getDeclaredDescriptorsAccessibleBySimpleName, getDeclaredNamespace, setImplicitReceiver
 
Methods inherited from interface org.jetbrains.jet.lang.resolve.scopes.JetScope
getAllDescriptors, getContainingDeclaration, getDeclarationsByLabel, getObjectDescriptors, getOwnDeclaredDescriptors, getPropertyByFieldReference
 

Field Detail

redeclarationHandler

protected final RedeclarationHandler redeclarationHandler
Constructor Detail

WritableScopeWithImports

public WritableScopeWithImports(@NotNull
                                JetScope scope,
                                @NotNull
                                RedeclarationHandler redeclarationHandler,
                                @NotNull
                                java.lang.String debugName)
Method Detail

changeLockLevel

public WritableScope changeLockLevel(WritableScope.LockLevel lockLevel)
Specified by:
changeLockLevel in interface WritableScope

checkMayRead

protected void checkMayRead()

checkMayWrite

protected void checkMayWrite()

checkMayNotWrite

protected void checkMayNotWrite()

getImports

@NotNull
protected final java.util.List<JetScope> getImports()

importScope

public void importScope(@NotNull
                        JetScope imported)
Specified by:
importScope in interface WritableScope

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
Overrides:
getImplicitReceiversHierarchy in class AbstractScopeAdapter

computeImplicitReceiversHierarchy

protected java.util.List<ReceiverParameterDescriptor> computeImplicitReceiversHierarchy()

getProperties

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

getLocalVariable

public VariableDescriptor getLocalVariable(@NotNull
                                           Name name)
Specified by:
getLocalVariable in interface JetScope
Overrides:
getLocalVariable in class AbstractScopeAdapter

getFunctions

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

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
Overrides:
getClassifier in class AbstractScopeAdapter

getObjectDescriptor

public ClassDescriptor getObjectDescriptor(@NotNull
                                           Name name)
Specified by:
getObjectDescriptor in interface JetScope
Overrides:
getObjectDescriptor in class AbstractScopeAdapter

getNamespace

public NamespaceDescriptor getNamespace(@NotNull
                                        Name name)
Specified by:
getNamespace in interface JetScope
Overrides:
getNamespace in class AbstractScopeAdapter

importClassifierAlias

public void importClassifierAlias(@NotNull
                                  Name importedClassifierName,
                                  @NotNull
                                  ClassifierDescriptor classifierDescriptor)
Specified by:
importClassifierAlias in interface WritableScope

importNamespaceAlias

public void importNamespaceAlias(@NotNull
                                 Name aliasName,
                                 @NotNull
                                 NamespaceDescriptor namespaceDescriptor)
Specified by:
importNamespaceAlias in interface WritableScope

importFunctionAlias

public void importFunctionAlias(@NotNull
                                Name aliasName,
                                @NotNull
                                FunctionDescriptor functionDescriptor)
Specified by:
importFunctionAlias in interface WritableScope

importVariableAlias

public void importVariableAlias(@NotNull
                                Name aliasName,
                                @NotNull
                                VariableDescriptor variableDescriptor)
Specified by:
importVariableAlias in interface WritableScope

clearImports

public void clearImports()
Specified by:
clearImports in interface WritableScope

toString

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