Minor. Methods made static
This commit is contained in:
@@ -199,7 +199,7 @@ public class AnnotationResolver {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resolveAnnotationsArguments(@Nullable JetModifierList modifierList, @NotNull BindingTrace trace) {
|
public static void resolveAnnotationsArguments(@Nullable JetModifierList modifierList, @NotNull BindingTrace trace) {
|
||||||
if (modifierList == null) {
|
if (modifierList == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ public class AnnotationResolver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resolveAnnotationsArguments(@NotNull Annotated descriptor, @NotNull BindingTrace trace) {
|
public static void resolveAnnotationsArguments(@NotNull Annotated descriptor, @NotNull BindingTrace trace) {
|
||||||
for (AnnotationDescriptor annotationDescriptor : descriptor.getAnnotations()) {
|
for (AnnotationDescriptor annotationDescriptor : descriptor.getAnnotations()) {
|
||||||
JetAnnotationEntry annotationEntry = trace.getBindingContext().get(ANNOTATION_DESCRIPTOR_TO_PSI_ELEMENT, annotationDescriptor);
|
JetAnnotationEntry annotationEntry = trace.getBindingContext().get(ANNOTATION_DESCRIPTOR_TO_PSI_ELEMENT, annotationDescriptor);
|
||||||
assert annotationEntry != null : "Cannot find annotation entry: " + annotationDescriptor;
|
assert annotationEntry != null : "Cannot find annotation entry: " + annotationDescriptor;
|
||||||
|
|||||||
@@ -383,7 +383,7 @@ public class BodyResolver {
|
|||||||
ClassDescriptorWithResolutionScopes classDescriptor = entry.getValue();
|
ClassDescriptorWithResolutionScopes classDescriptor = entry.getValue();
|
||||||
ConstructorDescriptor unsubstitutedPrimaryConstructor = classDescriptor.getUnsubstitutedPrimaryConstructor();
|
ConstructorDescriptor unsubstitutedPrimaryConstructor = classDescriptor.getUnsubstitutedPrimaryConstructor();
|
||||||
|
|
||||||
annotationResolver.resolveAnnotationsArguments(klass.getPrimaryConstructorModifierList(), trace);
|
AnnotationResolver.resolveAnnotationsArguments(klass.getPrimaryConstructorModifierList(), trace);
|
||||||
|
|
||||||
if (unsubstitutedPrimaryConstructor != null) {
|
if (unsubstitutedPrimaryConstructor != null) {
|
||||||
WritableScope parameterScope = getPrimaryConstructorParametersScope(classDescriptor.getScopeForClassHeaderResolution(), unsubstitutedPrimaryConstructor);
|
WritableScope parameterScope = getPrimaryConstructorParametersScope(classDescriptor.getScopeForClassHeaderResolution(), unsubstitutedPrimaryConstructor);
|
||||||
@@ -644,7 +644,7 @@ public class BodyResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void resolveAnnotationArguments(@NotNull JetScope scope, @NotNull JetModifierListOwner owner) {
|
private void resolveAnnotationArguments(@NotNull JetScope scope, @NotNull JetModifierListOwner owner) {
|
||||||
annotationResolver.resolveAnnotationsArguments(owner.getModifierList(), trace);
|
AnnotationResolver.resolveAnnotationsArguments(owner.getModifierList(), trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void computeDeferredType(JetType type) {
|
private static void computeDeferredType(JetType type) {
|
||||||
|
|||||||
+2
-1
@@ -25,6 +25,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.jet.lang.descriptors.*;
|
import org.jetbrains.jet.lang.descriptors.*;
|
||||||
import org.jetbrains.jet.lang.psi.*;
|
import org.jetbrains.jet.lang.psi.*;
|
||||||
|
import org.jetbrains.jet.lang.resolve.AnnotationResolver;
|
||||||
import org.jetbrains.jet.lang.resolve.BindingTrace;
|
import org.jetbrains.jet.lang.resolve.BindingTrace;
|
||||||
import org.jetbrains.jet.lang.resolve.ScriptNameUtil;
|
import org.jetbrains.jet.lang.resolve.ScriptNameUtil;
|
||||||
import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo;
|
import org.jetbrains.jet.lang.resolve.calls.autocasts.DataFlowInfo;
|
||||||
@@ -185,7 +186,7 @@ public abstract class AbstractLazyMemberScope<D extends DeclarationDescriptor, D
|
|||||||
// thus doesn't have a surrounding data flow
|
// thus doesn't have a surrounding data flow
|
||||||
DataFlowInfo.EMPTY);
|
DataFlowInfo.EMPTY);
|
||||||
result.add(propertyDescriptor);
|
result.add(propertyDescriptor);
|
||||||
resolveSession.getAnnotationResolver().resolveAnnotationsArguments(propertyDescriptor, trace);
|
AnnotationResolver.resolveAnnotationsArguments(propertyDescriptor, trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
getNonDeclaredProperties(name, result);
|
getNonDeclaredProperties(name, result);
|
||||||
|
|||||||
+1
-1
@@ -378,7 +378,7 @@ public class ExpressionTypingServices {
|
|||||||
ValueParameterDescriptor valueParameterDescriptor = valueParameterDescriptors.get(i);
|
ValueParameterDescriptor valueParameterDescriptor = valueParameterDescriptors.get(i);
|
||||||
JetParameter jetParameter = valueParameters.get(i);
|
JetParameter jetParameter = valueParameters.get(i);
|
||||||
|
|
||||||
annotationResolver.resolveAnnotationsArguments(jetParameter.getModifierList(), trace);
|
AnnotationResolver.resolveAnnotationsArguments(jetParameter.getModifierList(), trace);
|
||||||
|
|
||||||
if (!needCompleteAnalysis) continue;
|
if (!needCompleteAnalysis) continue;
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ public class ResolveElementCache {
|
|||||||
if (declaration != null) {
|
if (declaration != null) {
|
||||||
Annotated descriptor = resolveSession.resolveToDescriptor(declaration);
|
Annotated descriptor = resolveSession.resolveToDescriptor(declaration);
|
||||||
|
|
||||||
resolveSession.getAnnotationResolver().resolveAnnotationsArguments(
|
AnnotationResolver.resolveAnnotationsArguments(
|
||||||
descriptor,
|
descriptor,
|
||||||
resolveSession.getTrace()
|
resolveSession.getTrace()
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user