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

java.lang.Object
  extended by org.jetbrains.jet.lang.resolve.scopes.AbstractScopeAdapter
All Implemented Interfaces:
JetScope
Direct Known Subclasses:
ClassObjectMixinScope, InnerClassesScopeWrapper, JetScopeAdapter, LazyScopeAdapter

public abstract class AbstractScopeAdapter
extends java.lang.Object
implements JetScope

Introduces a simple wrapper for internal scope.


Field Summary
 
Fields inherited from interface org.jetbrains.jet.lang.resolve.scopes.JetScope
EMPTY
 
Constructor Summary
AbstractScopeAdapter()
           
 
Method Summary
 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)
           
 NamespaceDescriptor getNamespace(Name name)
           
 ClassDescriptor getObjectDescriptor(Name name)
           
 java.util.Collection<ClassDescriptor> getObjectDescriptors()
           
 java.util.Collection<DeclarationDescriptor> getOwnDeclaredDescriptors()
           
 java.util.Collection<VariableDescriptor> getProperties(Name name)
           
 PropertyDescriptor getPropertyByFieldReference(Name fieldName)
           
protected abstract  JetScope getWorkerScope()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractScopeAdapter

public AbstractScopeAdapter()
Method Detail

getWorkerScope

@NotNull
protected abstract JetScope getWorkerScope()

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

getFunctions

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

getNamespace

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

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

getObjectDescriptor

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

getObjectDescriptors

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

getProperties

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

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(LabelName labelName)
Specified by:
getDeclarationsByLabel in interface JetScope

getPropertyByFieldReference

public PropertyDescriptor getPropertyByFieldReference(@NotNull
                                                      Name fieldName)
Specified by:
getPropertyByFieldReference in interface JetScope
Parameters:
fieldName - includes the "$"
Returns:
the property declaring this field, if any

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.

getOwnDeclaredDescriptors

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