예제 #1
0
 /**
  * Extract the class files from the library to the target directory.
  *
  * @param jarFile the library containing the class files
  * @param context the context
  * @param decompilationDescriptor the decompilation descriptor
  * @throws DecompilationException if an error occurs extracting the class files
  */
 private void extractClassFiles(
     VirtualFile jarFile,
     DecompilationContext context,
     DecompilationDescriptor decompilationDescriptor)
     throws DecompilationException {
   try {
     JarFile lib = JarFileSystem.getInstance().getJarFile(jarFile);
     context
         .getConsoleContext()
         .addMessage(ConsoleEntryType.JAR_OPERATION, "message.examining", jarFile.getPath());
     JarExtractor jarExtractor = new JarExtractor();
     jarExtractor.extract(
         context,
         lib,
         decompilationDescriptor.getPackageNameAsPath(),
         decompilationDescriptor.getClassName());
   } catch (IOException e) {
     throw new DecompilationException(e);
   }
 }