Refactor: correct field description in PsiParameterWrapper and remove unused code in PsiClassWrapper

This commit is contained in:
Pavel V. Talanov
2012-10-03 21:28:15 +04:00
parent 9d2446ab9a
commit 7fd98f5ef5
2 changed files with 5 additions and 35 deletions
@@ -36,39 +36,7 @@ public class PsiClassWrapper {
public PsiClassWrapper(@NotNull PsiClass psiClass) {
this.psiClass = psiClass;
}
private List<PsiMethodWrapper> ownMethods;
@NotNull
public List<PsiMethodWrapper> getOwnMethods() {
if (ownMethods == null) {
PsiMethod[] psiMethods = psiClass.getMethods();
List<PsiMethodWrapper> methods = new ArrayList<PsiMethodWrapper>(psiMethods.length);
for (PsiMethod psiMethod : psiMethods) {
if (psiMethod.getContainingClass() != psiClass)
continue;
methods.add(new PsiMethodWrapper(psiMethod));
}
this.ownMethods = methods;
}
return ownMethods;
}
private List<PsiFieldWrapper> ownFields;
@NotNull
public List<PsiFieldWrapper> getOwnFields() {
if (ownFields == null) {
PsiField[] psiFields = psiClass.getFields();
List<PsiFieldWrapper> fields = new ArrayList<PsiFieldWrapper>(psiFields.length);
for (PsiField psiField : psiFields) {
if (psiField.getContainingClass() != psiClass)
continue;
fields.add(new PsiFieldWrapper(psiField));
}
this.ownFields = fields;
}
return ownFields;
}
public String getQualifiedName() {
return psiClass.getQualifiedName();
}
@@ -34,8 +34,10 @@ public class PsiParameterWrapper {
this.jetTypeParameter = JetTypeParameterAnnotation.get(psiParameter);
}
private JetValueParameterAnnotation jetValueParameter;
private JetTypeParameterAnnotation jetTypeParameter;
@NotNull
private final JetValueParameterAnnotation jetValueParameter;
@NotNull
private final JetTypeParameterAnnotation jetTypeParameter;
@NotNull
public PsiParameter getPsiParameter() {