Files
kotlin-fork/compiler/frontend.java/serialization.java/src/java_descriptors.proto
T
Alexander Udalov 19299daacd Deserialize annotations on class object properties
Class object properties' backing fields are generated into static fields of the
containing class, not into fields of class object. For fields we now store the
flag which, if set, tells that this field should be looked for in the
containing class
2013-08-26 15:59:45 +04:00

80 lines
2.4 KiB
Protocol Buffer

/*
* Copyright 2010-2013 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.jet.descriptors.serialization;
import "compiler/frontend/serialization/src/descriptors.proto";
option java_outer_classname = "JavaProtoBuf";
option optimize_for = LITE_RUNTIME;
message JavaType {
enum PrimitiveType {
// These values correspond to ASM Type sorts
VOID = 0;
BOOLEAN = 1;
CHAR = 2;
BYTE = 3;
SHORT = 4;
INT = 5;
FLOAT = 6;
LONG = 7;
DOUBLE = 8;
}
// One of these should be present
optional PrimitiveType primitive_type = 1;
optional int32 class_fq_name = 2;
optional int32 array_dimension = 3 [default = 0];
}
message JavaMethodSignature {
required int32 name = 1;
required JavaType return_type = 2;
repeated JavaType parameter_type = 3;
}
message JavaFieldSignature {
required int32 name = 1;
required JavaType type = 2;
// True iff this field is a backing field for a class object and is really present as a static
// field in the outer class, not as an instance field here
optional bool is_static_in_outer = 3 [default = false];
}
message JavaPropertySignature {
// A property itself is identified either by the field, or by the name of the synthetic method.
// If the property is annotated, then either field or synthetic_method_name should be present
optional JavaFieldSignature field = 1;
// Name of the synthetic method created to store property annotations. Signature is always "()V"
optional int32 synthetic_method_name = 2;
optional JavaMethodSignature getter = 3;
optional JavaMethodSignature setter = 4;
}
extend Callable {
optional JavaMethodSignature method_signature = 100;
optional JavaPropertySignature property_signature = 101;
// For top-level callables, short name of "...Package$src$..." class with the callable's body and annotations
optional int32 src_class_name = 102;
}