Пример #1
0
        internal static KotlinAnnotationArgument FromProtobuf(org.jetbrains.kotlin.metadata.jvm.Annotation.Argument a, JvmNameResolver resolver)
        {
            if (a is null)
            {
                return(null);
            }

            return(new KotlinAnnotationArgument {
                NameId = a.NameId,
                Value = KotlinAnnotationArgumentValue.FromProtobuf(a.value, resolver)
            });
        }
Пример #2
0
        internal static KotlinAnnotationArgumentValue FromProtobuf(org.jetbrains.kotlin.metadata.jvm.Annotation.Argument.Value value, JvmNameResolver resolver)
        {
            if (value is null)
            {
                return(null);
            }

            return(new KotlinAnnotationArgumentValue {
                Type = (KotlinAnnotationArgumentType)value.type,
                IntValue = value.IntValue,
                FloatValue = value.FloatValue,
                DoubleValue = value.DoubleValue,
                StringValue = resolver.GetString(value.StringValue),
                ClassId = value.ClassId,
                EnumValueId = value.EnumValueId,
                Annotation = KotlinAnnotation.FromProtobuf(value.Annotation, resolver),
                ArrayDimensionCount = value.ArrayDimensionCount,
                ArrayElements = value.ArrayElements?.Select(vp => KotlinAnnotationArgumentValue.FromProtobuf(vp, resolver)).ToList(),
                Flags = value.Flags
            });
        }