public List<Resource> scan(){
  List<Resource> foundResources=new LinkedList<>();
  List<Class<? extends Object>> classes;
  try {
    if (jarUrl == null) {
      if (this.clazz != null) {
        classes=getClassesInPackage(this.packageName,this.clazz);
      }
 else {
        classes=getClassesInPackage(this.packageName);
      }
    }
 else {
      classes=getClassesInJarFile(jarUrl);
    }
  }
 catch (  IOException e) {
    return foundResources;
  }
  for (  Class clazz : classes) {
    foundResources.addAll(getResourcesFromClassRecursive(clazz));
  }
  return foundResources;
}

public List < Resource > scan ( ) { List < Resource > foundResources = new LinkedList < > ( ) ; List < Class < ? extends Object > > classes ; try { if ( jarUrl == null ) { if ( this . clazz != null ) { classes = getClassesInPackage ( this . packageName , this . clazz ) ; } else { classes = getClassesInPackage ( this . packageName ) ; } } else { classes = getClassesInJarFile ( jarUrl ) ; } } catch ( IOException e ) { return foundResources ; } for ( Class clazz : classes ) { foundResources . addAll ( getResourcesFromClassRecursive ( clazz ) ) ; } return foundResources ; }
scans package for jax - rs annotations
