@ Nonnull public BugInstance addMethod ( PreorderVisitor visitor ) { MethodAnnotation methodAnnotation = MethodAnnotation . fromVisitedMethod ( visitor ) ; addMethod ( methodAnnotation ) ; addSourceLinesForMethod ( methodAnnotation , SourceLineAnnotation . fromVisitedMethod ( visitor ) ) ; return this ; }
Add a method annotation for the method which the given visitor is currently visiting . If the method has source line information then a SourceLineAnnotation is added to the method .