@Requires({
    "parent != null",
    "annotation != null"
  })
  @Ensures("result != null")
  @SuppressWarnings("unchecked")
  protected List<Long> getLineNumbers(Element parent,
                                      AnnotationMirror annotation) {
    if (JavaUtils.classExists("com.sun.source.util.Trees")) {
      try {
        return (List<Long>) Class
            .forName("com.google.java.contract.core.apt.JavacUtils")
            .getMethod("getLineNumbers", ProcessingEnvironment.class,
                       Element.class, AnnotationMirror.class)
            .invoke(null, utils.processingEnv, parent, annotation);
      } catch (Exception e) {
        return Collections.emptyList();
      }
    } else {
      return Collections.emptyList();
    }
  }
@ Requires ( { "parent != null" , "annotation != null" } ) @ Ensures ( "result != null" ) @ SuppressWarnings ( "unchecked" ) protected List < Long > getLineNumbers ( Element parent , AnnotationMirror annotation ) { if ( JavaUtils . classExists ( "com.sun.source.util.Trees" ) ) { try { return ( List < Long > ) Class . forName ( "com.google.java.contract.core.apt.JavacUtils" ) . getMethod ( "getLineNumbers" , ProcessingEnvironment . class , Element . class , AnnotationMirror . class ) . invoke ( null , utils . processingEnv , parent , annotation ) ; } catch ( Exception e ) { return Collections . emptyList ( ) ; } } else { return Collections . emptyList ( ) ; } }
Returns the line numbers associated with {@code annotation} if
available.