@SuppressWarnings({"ClassLoader2Instantiation"}) private static GridUriDeploymentFileProcessorResult processWithDescriptorFile(GridUriDeploymentSpringDocument doc,File file,String uri,IgniteLogger log) throws IgniteSpiException {
  ClassLoader clsLdr=GridUriDeploymentClassLoaderFactory.create(U.gridClassLoader(),file,log);
  List<Class<? extends ComputeTask<?,?>>> tasks=doc.getTasks(clsLdr);
  List<Class<? extends ComputeTask<?,?>>> validTasks=null;
  if (!F.isEmpty(tasks)) {
    validTasks=new ArrayList<>();
    for (    Class<? extends ComputeTask<?,?>> task : tasks) {
      if (!isAllowedTaskClass(task)) {
        U.warn(log,"Failed to load task. Task should be public none-abstract class " + "(might be inner static one) that implements ComputeTask interface [taskCls=" + task + ']');
      }
 else {
        if (log.isDebugEnabled())         log.debug("Found grid deployment task: " + task.getName());
        validTasks.add(task);
      }
    }
  }
  GridUriDeploymentFileProcessorResult res=new GridUriDeploymentFileProcessorResult();
  res.setFile(file);
  res.setClassLoader(clsLdr);
  if (!F.isEmpty(validTasks))   res.setTaskClasses(validTasks);
 else   if (log.isDebugEnabled())   log.debug("No tasks loaded from file [file=" + file.getAbsolutePath() + ", uri="+ U.hidePassword(uri)+ ']');
  return res;
}

@ SuppressWarnings ( { "ClassLoader2Instantiation" } ) private static GridUriDeploymentFileProcessorResult processWithDescriptorFile ( GridUriDeploymentSpringDocument doc , File file , String uri , IgniteLogger log ) throws IgniteSpiException { ClassLoader clsLdr = GridUriDeploymentClassLoaderFactory . create ( U . gridClassLoader ( ) , file , log ) ; List < Class < ? extends ComputeTask < ? , ? > > > tasks = doc . getTasks ( clsLdr ) ; List < Class < ? extends ComputeTask < ? , ? > > > validTasks = null ; if ( ! F . isEmpty ( tasks ) ) { validTasks = new ArrayList < > ( ) ; for ( Class < ? extends ComputeTask < ? , ? > > task : tasks ) { if ( ! isAllowedTaskClass ( task ) ) { U . warn ( log , "Failed to load task. Task should be public none-abstract class " + "(might be inner static one) that implements ComputeTask interface [taskCls=" + task + ']' ) ; } else { if ( log . isDebugEnabled ( ) ) log . debug ( "Found grid deployment task: " + task . getName ( ) ) ; validTasks . add ( task ) ; } } } GridUriDeploymentFileProcessorResult res = new GridUriDeploymentFileProcessorResult ( ) ; res . setFile ( file ) ; res . setClassLoader ( clsLdr ) ; if ( ! F . isEmpty ( validTasks ) ) res . setTaskClasses ( validTasks ) ; else if ( log . isDebugEnabled ( ) ) log . debug ( "No tasks loaded from file [file=" + file . getAbsolutePath ( ) + ", uri=" + U . hidePassword ( uri ) + ']' ) ; return res ; }
processes given gar file and returns back all tasks which are in descriptor .
