JetParameter made JetCallableDeclaration
This commit is contained in:
@@ -26,7 +26,10 @@ import org.jetbrains.jet.lang.psi.stubs.elements.JetStubElementTypes;
|
||||
import org.jetbrains.jet.lang.psi.typeRefHelpers.TypeRefHelpersPackage;
|
||||
import org.jetbrains.jet.lexer.JetTokens;
|
||||
|
||||
public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> {
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> implements JetCallableDeclaration {
|
||||
|
||||
public JetParameter(@NotNull ASTNode node) {
|
||||
super(node);
|
||||
@@ -41,14 +44,15 @@ public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> {
|
||||
return visitor.visitParameter(this, data);
|
||||
}
|
||||
|
||||
//TODO: rename it to getTypeRef for consistency
|
||||
@Override
|
||||
@Nullable
|
||||
public JetTypeReference getTypeReference() {
|
||||
return getStubOrPsiChild(JetStubElementTypes.TYPE_REFERENCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public JetTypeReference setTypeRef(@Nullable JetTypeReference typeRef) {
|
||||
public JetTypeReference setTypeReference(@Nullable JetTypeReference typeRef) {
|
||||
return TypeRefHelpersPackage.setTypeReference(this, getNameIdentifier(), typeRef);
|
||||
}
|
||||
|
||||
@@ -121,4 +125,28 @@ public class JetParameter extends JetNamedDeclarationStub<PsiJetParameterStub> {
|
||||
public boolean isLoopParameter() {
|
||||
return getParent() instanceof JetForExpression;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public JetParameterList getValueParameterList() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public JetTypeReference getReceiverTypeReference() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<JetTypeConstraint> getTypeConstraints() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public List<JetTypeParameter> getTypeParameters() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user