Remove KotlinSignature annotations from project code
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.descriptors;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.types.JetType;
|
||||
@@ -32,7 +31,6 @@ public interface CallableDescriptor extends DeclarationDescriptorWithVisibility,
|
||||
@Nullable
|
||||
ReceiverParameterDescriptor getDispatchReceiverParameter();
|
||||
|
||||
@KotlinSignature("fun getTypeParameters(): List<TypeParameterDescriptor>")
|
||||
@NotNull
|
||||
List<TypeParameterDescriptor> getTypeParameters();
|
||||
|
||||
@@ -49,7 +47,6 @@ public interface CallableDescriptor extends DeclarationDescriptorWithVisibility,
|
||||
@Override
|
||||
CallableDescriptor substitute(@NotNull TypeSubstitutor substitutor);
|
||||
|
||||
@KotlinSignature("fun getValueParameters(): List<ValueParameterDescriptor>")
|
||||
@NotNull
|
||||
List<ValueParameterDescriptor> getValueParameters();
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.descriptors;
|
||||
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotated;
|
||||
@@ -38,7 +37,7 @@ public interface DeclarationDescriptor extends Annotated, Named {
|
||||
@Nullable
|
||||
DeclarationDescriptor substitute(@NotNull TypeSubstitutor substitutor);
|
||||
|
||||
@KotlinSignature("fun <R, D> accept(visitor: DeclarationDescriptorVisitor<R, D>, data: D): R")
|
||||
<R, D> R accept(DeclarationDescriptorVisitor<R, D> visitor, D data);
|
||||
|
||||
void acceptVoid(DeclarationDescriptorVisitor<Void, Void> visitor);
|
||||
}
|
||||
|
||||
-4
@@ -16,10 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.descriptors;
|
||||
|
||||
import kotlin.jvm.KotlinSignature;
|
||||
|
||||
public interface DeclarationDescriptorVisitor<R, D> {
|
||||
|
||||
R visitPackageFragmentDescriptor(PackageFragmentDescriptor descriptor, D data);
|
||||
|
||||
R visitPackageViewDescriptor(PackageViewDescriptor descriptor, D data);
|
||||
@@ -32,7 +29,6 @@ public interface DeclarationDescriptorVisitor<R, D> {
|
||||
|
||||
R visitClassDescriptor(ClassDescriptor descriptor, D data);
|
||||
|
||||
@KotlinSignature("fun visitModuleDeclaration(descriptor: ModuleDescriptor, data: D): R")
|
||||
R visitModuleDeclaration(ModuleDescriptor descriptor, D data);
|
||||
|
||||
R visitConstructorDescriptor(ConstructorDescriptor constructorDescriptor, D data);
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.jetbrains.kotlin.resolve;
|
||||
|
||||
import kotlin.CollectionsKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.KotlinSignature;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -499,9 +498,7 @@ public class OverridingUtil {
|
||||
return maxVisibility;
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
@KotlinSignature("fun getTopmostOverridenDescriptors(originalDescriptor: CallableDescriptor): List<out CallableDescriptor>")
|
||||
public static List<? extends CallableDescriptor> getTopmostOverridenDescriptors(@NotNull CallableDescriptor originalDescriptor) {
|
||||
return DFS.dfs(
|
||||
Collections.singletonList(originalDescriptor),
|
||||
@@ -525,38 +522,6 @@ public class OverridingUtil {
|
||||
);
|
||||
}
|
||||
|
||||
public static boolean traverseOverridenDescriptors(
|
||||
@NotNull CallableDescriptor originalDescriptor,
|
||||
@NotNull final Function1<CallableDescriptor, Boolean> handler
|
||||
) {
|
||||
return DFS.dfs(
|
||||
Collections.singletonList(originalDescriptor),
|
||||
new DFS.Neighbors<CallableDescriptor>() {
|
||||
@NotNull
|
||||
@Override
|
||||
public Iterable<? extends CallableDescriptor> getNeighbors(CallableDescriptor current) {
|
||||
return current.getOverriddenDescriptors();
|
||||
}
|
||||
},
|
||||
new DFS.AbstractNodeHandler<CallableDescriptor, Boolean>() {
|
||||
private boolean result = true;
|
||||
|
||||
@Override
|
||||
public boolean beforeChildren(CallableDescriptor current) {
|
||||
if (!handler.invoke(current)) {
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean result() {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public interface DescriptorSink {
|
||||
void addFakeOverride(@NotNull CallableMemberDescriptor fakeOverride);
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.types;
|
||||
|
||||
import kotlin.jvm.KotlinSignature;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.ReadOnly;
|
||||
@@ -30,7 +29,8 @@ import java.util.List;
|
||||
* @see JetTypeChecker#isSubtypeOf(JetType, JetType)
|
||||
*/
|
||||
public interface JetType extends Annotated {
|
||||
@NotNull TypeConstructor getConstructor();
|
||||
@NotNull
|
||||
TypeConstructor getConstructor();
|
||||
|
||||
@NotNull
|
||||
@ReadOnly
|
||||
@@ -49,7 +49,6 @@ public interface JetType extends Annotated {
|
||||
@Override
|
||||
boolean equals(Object other);
|
||||
|
||||
@KotlinSignature("fun <T : TypeCapability> getCapability(capabilityClass: Class<T>): T?")
|
||||
@Nullable
|
||||
<T extends TypeCapability> T getCapability(@NotNull Class<T> capabilityClass);
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.utils;
|
||||
|
||||
import kotlin.jvm.KotlinSignature;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
@@ -78,17 +77,14 @@ public class DFS {
|
||||
}
|
||||
|
||||
public interface NodeHandler<N, R> {
|
||||
@KotlinSignature("fun beforeChildren(current: N): Boolean")
|
||||
boolean beforeChildren(N current);
|
||||
|
||||
@KotlinSignature("fun afterChildren(current: N): Unit")
|
||||
void afterChildren(N current);
|
||||
|
||||
R result();
|
||||
}
|
||||
|
||||
public interface Neighbors<N> {
|
||||
@KotlinSignature("fun getNeighbors(current: N): Iterable<N>")
|
||||
@NotNull
|
||||
Iterable<? extends N> getNeighbors(N current);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user