001 /*
002 * Copyright 2010-2013 JetBrains s.r.o.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017 package org.jetbrains.jet.lang.resolve.scopes;
018
019 import org.jetbrains.annotations.NotNull;
020 import org.jetbrains.annotations.TestOnly;
021 import org.jetbrains.jet.lang.descriptors.*;
022 import org.jetbrains.jet.lang.resolve.name.LabelName;
023 import org.jetbrains.jet.lang.resolve.name.Name;
024 import org.jetbrains.jet.utils.Printer;
025
026 import java.util.Collection;
027 import java.util.Collections;
028 import java.util.List;
029
030 public abstract class JetScopeImpl implements JetScope {
031 @Override
032 public ClassifierDescriptor getClassifier(@NotNull Name name) {
033 return null;
034 }
035
036 @NotNull
037 @Override
038 public Collection<VariableDescriptor> getProperties(@NotNull Name name) {
039 return Collections.emptySet();
040 }
041
042 @Override
043 public VariableDescriptor getLocalVariable(@NotNull Name name) {
044 return null;
045 }
046
047 @Override
048 public NamespaceDescriptor getNamespace(@NotNull Name name) {
049 return null;
050 }
051
052 @NotNull
053 @Override
054 public Collection<FunctionDescriptor> getFunctions(@NotNull Name name) {
055 return Collections.emptySet();
056 }
057
058 @NotNull
059 @Override
060 public Collection<DeclarationDescriptor> getDeclarationsByLabel(LabelName labelName) {
061 return Collections.emptyList();
062 }
063
064 @NotNull
065 @Override
066 public Collection<DeclarationDescriptor> getAllDescriptors() {
067 return Collections.emptyList();
068 }
069
070 @NotNull
071 @Override
072 public List<ReceiverParameterDescriptor> getImplicitReceiversHierarchy() {
073 return Collections.emptyList();
074 }
075
076 @NotNull
077 @Override
078 public Collection<DeclarationDescriptor> getOwnDeclaredDescriptors() {
079 return Collections.emptyList();
080 }
081
082 // This method should not be implemented here by default: every scope class has its unique structure pattern
083 @TestOnly
084 @Override
085 public abstract void printScopeStructure(@NotNull Printer p);
086 }