Use object instead of pair for describing function type parameters

This commit is contained in:
Andrey Vlasovskikh
2013-08-02 15:41:20 +04:00
parent afd5c68804
commit bbcee93c26
12 changed files with 118 additions and 49 deletions
@@ -0,0 +1,19 @@
package com.jetbrains.python.psi.types;
import com.jetbrains.python.psi.PyParameter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* @author vlan
*/
public interface PyCallableParameter {
@Nullable
String getName();
@Nullable
PyType getType();
@Nullable
PyParameter getParameter();
}
@@ -1,6 +1,5 @@
package com.jetbrains.python.psi.types;
import com.intellij.openapi.util.Pair;
import com.jetbrains.python.psi.PyQualifiedExpression;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -32,8 +31,8 @@ public interface PyCallableType extends PyType {
/**
* Returns the list of parameter types.
*
* @return list of (name, type) pairs or null if not applicable. Name and type in pair may be null.
* @return list of parameter info null if not applicable.
*/
@Nullable
List<Pair<String, PyType>> getParameters(@NotNull TypeEvalContext context);
List<PyCallableParameter> getParameters(@NotNull TypeEvalContext context);
}