public Annotation parse ( Annotation rootAnnotation ) { mPos = 0 ; if ( parseTag ( ) != TAG_ANNOTATION ) { throw error ( "Malformed" ) ; } TypeDesc rootAnnotationType = parseTypeDesc ( ) ; if ( rootAnnotation == null ) { rootAnnotation = buildRootAnnotation ( rootAnnotationType ) ; } else if ( ! rootAnnotationType . equals ( rootAnnotation . getType ( ) ) ) { throw new IllegalArgumentException ( "Annotation type of \"" + rootAnnotationType + "\" does not match expected type of \"" + rootAnnotation . getType ( ) ) ; } parseAnnotation ( rootAnnotation , rootAnnotationType ) ; return rootAnnotation ; }
Parses the given annotation returning the root annotation that received the results .