code: public static List<Instance> findAllScopedInstances( AbstractApplication app ) {
  
  		List<Instance> instanceList = new ArrayList<> ();
  		List<Instance> todo = new ArrayList<> ();
  		todo.addAll( app.getRootInstances());
  
  		while( ! todo.isEmpty()) {
  			Instance current = todo.remove( 0 );
  			todo.addAll( current.getChildren());
  			if( isTarget( current ))
  				instanceList.add( current );
  		}
  
  		return instanceList;
  	}
docs: Finds all the scoped instances from an application.
  @return a non-null list