Skip to content

Commit

Permalink
Refactor: correct field description in PsiParameterWrapper and remove…
Browse files Browse the repository at this point in the history
… unused code in PsiClassWrapper
  • Loading branch information
pTalanov committed Oct 3, 2012
1 parent 9d2446a commit 7fd98f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
Expand Up @@ -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();
}
Expand Down
Expand Up @@ -34,8 +34,10 @@ public PsiParameterWrapper(@NotNull PsiParameter psiParameter) {
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() {
Expand Down

0 comments on commit 7fd98f5

Please sign in to comment.