Refactor: correct field description in PsiParameterWrapper and remove unused code in PsiClassWrapper
This commit is contained in:
+1
-33
@@ -36,39 +36,7 @@ public class PsiClassWrapper {
|
|||||||
public PsiClassWrapper(@NotNull PsiClass psiClass) {
|
public PsiClassWrapper(@NotNull PsiClass psiClass) {
|
||||||
this.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() {
|
public String getQualifiedName() {
|
||||||
return psiClass.getQualifiedName();
|
return psiClass.getQualifiedName();
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -34,8 +34,10 @@ public class PsiParameterWrapper {
|
|||||||
this.jetTypeParameter = JetTypeParameterAnnotation.get(psiParameter);
|
this.jetTypeParameter = JetTypeParameterAnnotation.get(psiParameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private JetValueParameterAnnotation jetValueParameter;
|
@NotNull
|
||||||
private JetTypeParameterAnnotation jetTypeParameter;
|
private final JetValueParameterAnnotation jetValueParameter;
|
||||||
|
@NotNull
|
||||||
|
private final JetTypeParameterAnnotation jetTypeParameter;
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public PsiParameter getPsiParameter() {
|
public PsiParameter getPsiParameter() {
|
||||||
|
|||||||
Reference in New Issue
Block a user