JetTypeParameterListOwner: Add getTypeParameterList() and getTypeConstraintList() methods

This commit is contained in:
Alexey Sedunov
2014-11-05 18:50:43 +03:00
parent 7123ca8ea0
commit aaf4283531
5 changed files with 37 additions and 2 deletions
@@ -66,6 +66,18 @@ public class JetMultiDeclarationEntry extends JetNamedDeclarationNotStubbed impl
return null;
}
@Nullable
@Override
public JetTypeParameterList getTypeParameterList() {
return null;
}
@Nullable
@Override
public JetTypeConstraintList getTypeConstraintList() {
return null;
}
@NotNull
@Override
public List<JetTypeConstraint> getTypeConstraints() {
@@ -145,6 +145,18 @@ public class JetParameter extends JetNamedDeclarationStub<KotlinParameterStub> i
return null;
}
@Nullable
@Override
public JetTypeParameterList getTypeParameterList() {
return null;
}
@Nullable
@Override
public JetTypeConstraintList getTypeConstraintList() {
return null;
}
@NotNull
@Override
public List<JetTypeConstraint> getTypeConstraints() {
@@ -17,10 +17,17 @@
package org.jetbrains.jet.lang.psi;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
public interface JetTypeParameterListOwner extends JetNamedDeclaration {
@Nullable
JetTypeParameterList getTypeParameterList();
@Nullable
JetTypeConstraintList getTypeConstraintList();
@NotNull
List<JetTypeConstraint> getTypeConstraints();
@@ -31,13 +31,15 @@ abstract class JetTypeParameterListOwnerNotStubbed extends JetNamedDeclarationNo
super(node);
}
@Override
@Nullable
JetTypeParameterList getTypeParameterList() {
public JetTypeParameterList getTypeParameterList() {
return (JetTypeParameterList) findChildByType(JetNodeTypes.TYPE_PARAMETER_LIST);
}
@Override
@Nullable
JetTypeConstraintList getTypeConstraintList() {
public JetTypeConstraintList getTypeConstraintList() {
return (JetTypeConstraintList) findChildByType(JetNodeTypes.TYPE_CONSTRAINT_LIST);
}
@@ -35,11 +35,13 @@ abstract class JetTypeParameterListOwnerStub<T extends KotlinStubWithFqName> ext
super(node);
}
@Override
@Nullable
public JetTypeParameterList getTypeParameterList() {
return getStubOrPsiChild(JetStubElementTypes.TYPE_PARAMETER_LIST);
}
@Override
@Nullable
public JetTypeConstraintList getTypeConstraintList() {
return getStubOrPsiChild(JetStubElementTypes.TYPE_CONSTRAINT_LIST);