2 * Copyright 2000-2007 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package com
.intellij
.psi
;
18 import org
.jetbrains
.annotations
.Nullable
;
21 * Represents the result of resolving a {@link com.intellij.psi.PsiPolyVariantReference}.
23 * @see com.intellij.psi.PsiElementResolveResult
25 public interface ResolveResult
{
27 * The empty array of PSI resolve results which can be reused to avoid unnecessary allocations.
29 ResolveResult
[] EMPTY_ARRAY
= new ResolveResult
[0];
32 * Returns the result of the resolve.
34 * @return an element the reference is resolved to.
37 PsiElement
getElement();
40 * Checks if the reference was resolved to a valid element.
42 * @return true if the resolve encountered no problems
44 boolean isValidResult();