Example #1
0
        /// <summary>
        /// https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.7
        /// </summary>
        public Annotation? ReadAnnotation()
        {
            if (Char != '@')return null;

            Skip().SkipSpaces(); // skip @ and spaces

            string simpleName = JavaParseUtils.FullToSimpleName(ReadFullTypeName()); // read type name
            if (simpleName.Length == 0)return null;

            if (SkipSpaces().Char == '('){ // skip arguments and ignore
                SkipBlock('(', ')');
            }

            Annotation annotation = new Annotation(simpleName);
            if (AnnotationCallback != null)AnnotationCallback(annotation);

            return annotation;
        }
Example #2
0
 private void IncrementAnnotation(Annotation annotation)
 {
     GlobalInfo.AnnotationUses.Increment(annotation.SimpleName);
 }