Esempio n. 1
0
        public void AnnotationToString(TextWriter output, EncodedAnnotation annotation, Class currentClass, Indentation indent)
        {
            var attributes = new List <string> ();

            foreach (var pair in annotation.GetAnnotations())
            {
                attributes.Add(string.Format("{0}={1}", pair.GetName(_dex), _helper.EncodedValueToString(pair.Value, currentClass)));
            }

            output.WriteLine(string.Format("@{0}({1})", _dex.GetTypeName(annotation.AnnotationType), string.Join(",", attributes)));
        }
Esempio n. 2
0
        void WriteOutAnnotation(TextWriter output, EncodedAnnotation annotation, Class currentClass, Indentation indent)
        {
            output.WriteLine(string.Format("{0}.ANNOTATION {1}", indent.ToString(), _dex.GetTypeName(annotation.AnnotationType)));

            indent++;
            var stringIndent = indent.ToString();

            foreach (var pair in annotation.GetAnnotations())
            {
                output.WriteLine(string.Format("{0}{1}={2}", stringIndent, pair.GetName(_dex), _helper.EncodedValueToString(pair.Value, currentClass)));
            }

            indent--;
        }
Esempio n. 3
0
 public Annotation(BinaryReader reader)
 {
     Visibility = (AnnotationVisibility)reader.ReadByte();
     Values     = new EncodedAnnotation(reader);
 }