JetTypeReference#getAttributeAnnotations() by stubs

This commit is contained in:
Pavel V. Talanov
2014-03-26 17:53:29 +04:00
parent 2e23d27b0d
commit bb26e08b7b
2 changed files with 5 additions and 2 deletions
@@ -25,6 +25,7 @@ import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
import java.util.List;
public class JetAnnotation extends JetElementImplStub<PsiJetPlaceHolderStub<JetAnnotation>> {
public JetAnnotation(@NotNull ASTNode node) {
super(node);
}
@@ -19,7 +19,6 @@ package org.jetbrains.jet.lang.psi;
import com.intellij.lang.ASTNode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.JetNodeTypes;
import org.jetbrains.jet.lang.psi.stubs.PsiJetPlaceHolderStub;
import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
@@ -27,6 +26,8 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes.ANNOTATION;
/**
* Type reference element.
* Underlying token is {@link org.jetbrains.jet.JetNodeTypes#TYPE_REFERENCE}
@@ -45,8 +46,9 @@ public class JetTypeReference extends JetElementImplStub<PsiJetPlaceHolderStub<J
return visitor.visitTypeReference(this, data);
}
@NotNull
public List<JetAnnotation> getAttributeAnnotations() {
return findChildrenByType(JetNodeTypes.ANNOTATION);
return getStubOrPsiChildrenAsList(ANNOTATION);
}
@Nullable