public boolean packageHasAnnotation(Annotation annotation){
  try {
    Package pkg=type.getPackage();
    if (pkg == null) {
      return false;
    }
    String className=pkg.getName() + ".package-info";
    Class<?> packageType=Class.forName(className);
    AnnotationAccessor accessor=new AnnotationAccessor(supportedAnnotations,packageType,ignoreAnnotationFailure);
    return accessor.typeHas(annotation);
  }
 catch (  ClassNotFoundException e) {
    return false;
  }
}

public boolean packageHasAnnotation ( Annotation annotation ) { try { Package pkg = type . getPackage ( ) ; if ( pkg == null ) { return false ; } String className = pkg . getName ( ) + ".package-info" ; Class < ? > packageType = Class . forName ( className ) ; AnnotationAccessor accessor = new AnnotationAccessor ( supportedAnnotations , packageType , ignoreAnnotationFailure ) ; return accessor . typeHas ( annotation ) ; } catch ( ClassNotFoundException e ) { return false ; } }
determines whether the package in which t resides has a particular annotation .
