use of com.intellij.psi.PsiParameter in project android by JetBrains.
the class PsiCFGPartialMethodSignatureBuilder method buildFromPsiMethod.
public static PsiCFGPartialMethodSignature buildFromPsiMethod(PsiMethod psiMethod) {
PsiCFGPartialMethodSignature retSignature = new PsiCFGPartialMethodSignature();
retSignature.methodName = psiMethod.getName().trim();
if (psiMethod.isVarArgs()) {
retSignature.isVarArgs = true;
}
PsiParameter[] paramList = psiMethod.getParameterList().getParameters();
if (paramList == null || paramList.length == 0) {
retSignature.parameterTypes = PsiType.EMPTY_ARRAY;
} else {
retSignature.parameterTypes = new PsiType[paramList.length];
for (int i = 0; i < paramList.length; i++) {
PsiType curParamType = paramList[i].getType();
retSignature.parameterTypes[i] = curParamType;
}
}
return retSignature;
}
Aggregations