Minor, encapsulate logic
This commit is contained in:
+1
-1
@@ -162,7 +162,7 @@ public final class JavaConstructorResolver {
|
||||
Collections.<AnnotationDescriptor>emptyList(),
|
||||
method.getName(),
|
||||
typeTransformer.transformToType(returnType, typeVariableResolver),
|
||||
method.getAnnotationParameterDefaultValue() != null,
|
||||
method.hasAnnotationParameterDefaultValue(),
|
||||
varargElementType));
|
||||
|
||||
index++;
|
||||
|
||||
+2
-6
@@ -56,13 +56,9 @@ public class JavaMethod extends JavaMemberImpl implements JavaTypeParameterListO
|
||||
return valueParameters(getPsi().getParameterList().getParameters());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Object getAnnotationParameterDefaultValue() {
|
||||
public boolean hasAnnotationParameterDefaultValue() {
|
||||
PsiMethod psiMethod = getPsi();
|
||||
if (psiMethod instanceof PsiAnnotationMethod) {
|
||||
return ((PsiAnnotationMethod) psiMethod).getDefaultValue();
|
||||
}
|
||||
return null;
|
||||
return psiMethod instanceof PsiAnnotationMethod && ((PsiAnnotationMethod) psiMethod).getDefaultValue() != null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user