Serialize/deserialize annotations on types
This commit is contained in:
+3
-1
@@ -299,7 +299,7 @@ public class DescriptorSerializer {
|
||||
case IN_VARIANCE:
|
||||
return ProtoBuf.TypeParameter.Variance.IN;
|
||||
case OUT_VARIANCE:
|
||||
return ProtoBuf.TypeParameter.Variance.OUT;
|
||||
return ProtoBuf.TypeParameter.Variance.OUT;
|
||||
}
|
||||
throw new IllegalStateException("Unknown variance: " + variance);
|
||||
}
|
||||
@@ -323,6 +323,8 @@ public class DescriptorSerializer {
|
||||
builder.setNullable(true);
|
||||
}
|
||||
|
||||
extension.serializeType(type, builder, stringTable);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor;
|
||||
import org.jetbrains.kotlin.types.JetType;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -53,6 +54,13 @@ public abstract class SerializerExtension {
|
||||
) {
|
||||
}
|
||||
|
||||
public void serializeType(
|
||||
@NotNull JetType type,
|
||||
@NotNull ProtoBuf.Type.Builder proto,
|
||||
@NotNull StringTable stringTable
|
||||
) {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getLocalClassName(@NotNull ClassDescriptor descriptor) {
|
||||
throw new UnsupportedOperationException("Local classes are unsupported: " + descriptor);
|
||||
|
||||
Reference in New Issue
Block a user