| /* |
| * Copyright 2010-2015 JetBrains s.r.o. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| package org.jetbrains.kotlin.library.metadata; |
| |
| // Changes to this proto are tracked by KlibMetadataVersion version. See KlibMetadataVersion KDoc. |
| |
| import "core/metadata/src/metadata.proto"; |
| import "core/metadata/src/ext_options.proto"; |
| |
| option java_outer_classname = "KlibMetadataProtoBuf"; |
| option optimize_for = LITE_RUNTIME; |
| |
| message Header { |
| required string module_name = 1; |
| /* |
| Possible values are listed in KlibMetadataHeaderFlags class. |
| */ |
| optional int32 flags = 2; |
| optional org.jetbrains.kotlin.metadata.StringTable strings = 4; |
| optional org.jetbrains.kotlin.metadata.QualifiedNameTable qualified_names = 5; |
| // Annotations on the whole module |
| repeated org.jetbrains.kotlin.metadata.Annotation annotation = 6; |
| repeated string package_fragment_name = 7; |
| repeated string empty_package = 8; |
| repeated File file = 9; |
| |
| // TODO: Unused. |
| // TODO: We need to have backend specific extension for versionings. |
| // (patch << 16) + (minor << 8) + major |
| // optional int32 js_code_binary_version = 3 [default = 1]; |
| |
| } |
| |
| message File { |
| required string name = 1; |
| } |
| |
| message DescriptorUniqId { |
| required int64 index = 1; |
| |
| option (org.jetbrains.kotlin.metadata.skip_message_in_comparison) = true; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.Package { |
| optional int32 package_fq_name = 171; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.Class { |
| repeated org.jetbrains.kotlin.metadata.Annotation class_annotation = 170; |
| optional int32 class_file = 175 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; |
| optional string class_kdoc = 176 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; |
| optional DescriptorUniqId class_uniq_id = 171; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.Constructor { |
| repeated org.jetbrains.kotlin.metadata.Annotation constructor_annotation = 170; |
| optional string constructor_kdoc = 173 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; |
| optional DescriptorUniqId constructor_uniq_id = 172; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.Function { |
| repeated org.jetbrains.kotlin.metadata.Annotation function_annotation = 170; |
| repeated org.jetbrains.kotlin.metadata.Annotation function_extension_receiver_annotation = 171; |
| optional int32 function_file = 172 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; |
| optional string function_kdoc = 174 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; |
| optional DescriptorUniqId function_uniq_id = 173; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.Property { |
| repeated org.jetbrains.kotlin.metadata.Annotation property_annotation = 170; |
| repeated org.jetbrains.kotlin.metadata.Annotation property_getter_annotation = 177; |
| repeated org.jetbrains.kotlin.metadata.Annotation property_setter_annotation = 178; |
| repeated org.jetbrains.kotlin.metadata.Annotation property_backing_field_annotation = 181; |
| repeated org.jetbrains.kotlin.metadata.Annotation property_delegated_field_annotation = 182; |
| repeated org.jetbrains.kotlin.metadata.Annotation property_extension_receiver_annotation = 183; |
| optional org.jetbrains.kotlin.metadata.Annotation.Argument.Value compile_time_value = 173; |
| optional int32 property_file = 176 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; |
| optional string property_kdoc = 180 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; |
| optional DescriptorUniqId property_uniq_id = 179; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.EnumEntry { |
| repeated org.jetbrains.kotlin.metadata.Annotation enum_entry_annotation = 170; |
| optional int32 enum_entry_ordinal = 171; |
| optional DescriptorUniqId enum_entry_uniq_id = 172; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.ValueParameter { |
| repeated org.jetbrains.kotlin.metadata.Annotation parameter_annotation = 170; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.Type { |
| repeated org.jetbrains.kotlin.metadata.Annotation type_annotation = 170; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.TypeParameter { |
| repeated org.jetbrains.kotlin.metadata.Annotation type_parameter_annotation = 170; |
| optional DescriptorUniqId type_param_uniq_id = 171; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.PackageFragment { |
| repeated int32 package_fragment_files = 170 [(org.jetbrains.kotlin.metadata.skip_in_comparison) = true]; |
| optional bool is_empty = 172; |
| optional string fq_name = 173; |
| // id in StringTable |
| repeated int32 class_name = 174 [packed = true]; |
| } |
| |
| extend org.jetbrains.kotlin.metadata.TypeAlias { |
| // TODO repeated org.jetbrains.kotlin.metadata.Annotation type_alias_annotation = 130; |
| optional DescriptorUniqId type_alias_uniq_id = 131; |
| } |