Minor, rename method
'resolveAnnotations' gives a false impression that this method will resolve annotations with their arguments, which it does not
This commit is contained in:
@@ -63,11 +63,11 @@ public class AnnotationResolver {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public List<AnnotationDescriptor> resolveAnnotations(
|
||||
public List<AnnotationDescriptor> resolveAnnotationsWithoutArguments(
|
||||
@NotNull JetScope scope,
|
||||
@Nullable JetModifierList modifierList,
|
||||
@NotNull BindingTrace trace)
|
||||
{
|
||||
@NotNull BindingTrace trace
|
||||
) {
|
||||
return resolveAnnotations(scope, modifierList, trace, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,8 @@ public class DeclarationResolver {
|
||||
private void resolveAnnotationsForClassOrObject(AnnotationResolver annotationResolver, JetClassOrObject jetClass, MutableClassDescriptor descriptor) {
|
||||
JetModifierList modifierList = jetClass.getModifierList();
|
||||
if (modifierList != null) {
|
||||
descriptor.getAnnotations().addAll(annotationResolver.resolveAnnotations(descriptor.getScopeForSupertypeResolution(), modifierList, trace));
|
||||
descriptor.getAnnotations().addAll(annotationResolver.resolveAnnotationsWithoutArguments(
|
||||
descriptor.getScopeForSupertypeResolution(), modifierList, trace));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ public class DescriptorResolver {
|
||||
@NotNull DataFlowInfo dataFlowInfo
|
||||
) {
|
||||
return resolveFunctionDescriptor(containingDescriptor, scope, function, trace, dataFlowInfo,
|
||||
annotationResolver.resolveAnnotations(scope, function.getModifierList(), trace));
|
||||
annotationResolver.resolveAnnotationsWithoutArguments(scope, function.getModifierList(), trace));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -502,7 +502,7 @@ public class DescriptorResolver {
|
||||
JetParameter valueParameter, int index, JetType type, BindingTrace trace
|
||||
) {
|
||||
return resolveValueParameterDescriptor(declarationDescriptor, valueParameter, index, type, trace,
|
||||
annotationResolver.resolveAnnotations(scope, valueParameter.getModifierList(), trace));
|
||||
annotationResolver.resolveAnnotationsWithoutArguments(scope, valueParameter.getModifierList(), trace));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -511,8 +511,7 @@ public class DescriptorResolver {
|
||||
JetParameter valueParameter, int index, JetType type, BindingTrace trace
|
||||
) {
|
||||
return resolveValueParameterDescriptor(declarationDescriptor, valueParameter, index, type, trace,
|
||||
annotationResolver.resolveAnnotationsWithArguments(scope, valueParameter.getModifierList(),
|
||||
trace));
|
||||
annotationResolver.resolveAnnotationsWithArguments(scope, valueParameter.getModifierList(), trace));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -950,7 +949,7 @@ public class DescriptorResolver {
|
||||
Visibility visibility = resolveVisibilityFromModifiers(property, getDefaultVisibility(property, containingDeclaration));
|
||||
PropertyDescriptorImpl propertyDescriptor = new PropertyDescriptorImpl(
|
||||
containingDeclaration,
|
||||
annotationResolver.resolveAnnotations(scope, modifierList, trace),
|
||||
annotationResolver.resolveAnnotationsWithoutArguments(scope, modifierList, trace),
|
||||
modality,
|
||||
visibility,
|
||||
isVar,
|
||||
@@ -1142,7 +1141,8 @@ public class DescriptorResolver {
|
||||
JetPropertyAccessor setter = property.getSetter();
|
||||
PropertySetterDescriptorImpl setterDescriptor = null;
|
||||
if (setter != null) {
|
||||
List<AnnotationDescriptor> annotations = annotationResolver.resolveAnnotations(scope, setter.getModifierList(), trace);
|
||||
List<AnnotationDescriptor> annotations =
|
||||
annotationResolver.resolveAnnotationsWithoutArguments(scope, setter.getModifierList(), trace);
|
||||
JetParameter parameter = setter.getParameter();
|
||||
|
||||
setterDescriptor = new PropertySetterDescriptorImpl(
|
||||
@@ -1235,7 +1235,8 @@ public class DescriptorResolver {
|
||||
PropertyGetterDescriptorImpl getterDescriptor;
|
||||
JetPropertyAccessor getter = property.getGetter();
|
||||
if (getter != null) {
|
||||
List<AnnotationDescriptor> annotations = annotationResolver.resolveAnnotations(scope, getter.getModifierList(), trace);
|
||||
List<AnnotationDescriptor> annotations =
|
||||
annotationResolver.resolveAnnotationsWithoutArguments(scope, getter.getModifierList(), trace);
|
||||
|
||||
JetType outType = propertyDescriptor.getType();
|
||||
JetType returnType = outType;
|
||||
@@ -1297,7 +1298,7 @@ public class DescriptorResolver {
|
||||
) {
|
||||
ConstructorDescriptorImpl constructorDescriptor = new ConstructorDescriptorImpl(
|
||||
classDescriptor,
|
||||
annotationResolver.resolveAnnotations(scope, modifierList, trace),
|
||||
annotationResolver.resolveAnnotationsWithoutArguments(scope, modifierList, trace),
|
||||
isPrimary
|
||||
);
|
||||
trace.record(BindingContext.CONSTRUCTOR, declarationToTrace, constructorDescriptor);
|
||||
|
||||
Reference in New Issue
Block a user