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.Nullable;
021 import org.jetbrains.annotations.TestOnly;
022 import org.jetbrains.jet.lang.descriptors.*;
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 @Nullable
048 @Override
049 public PackageViewDescriptor getPackage(@NotNull Name name) {
050 return null;
051 }
052
053 @NotNull
054 @Override
055 public Collection<FunctionDescriptor> getFunctions(@NotNull Name name) {
056 return Collections.emptySet();
057 }
058
059 @NotNull
060 @Override
061 public Collection<DeclarationDescriptor> getDeclarationsByLabel(@NotNull Name labelName) {
062 return Collections.emptyList();
063 }
064
065 @NotNull
066 @Override
067 public Collection<DeclarationDescriptor> getAllDescriptors() {
068 return Collections.emptyList();
069 }
070
071 @NotNull
072 @Override
073 public List<ReceiverParameterDescriptor> getImplicitReceiversHierarchy() {
074 return Collections.emptyList();
075 }
076
077 @NotNull
078 @Override
079 public Collection<DeclarationDescriptor> getOwnDeclaredDescriptors() {
080 return Collections.emptyList();
081 }
082
083 // This method should not be implemented here by default: every scope class has its unique structure pattern
084 @TestOnly
085 @Override
086 public abstract void printScopeStructure(@NotNull Printer p);
087 }