Package org.eclipse.jdt.internal.compiler.util

Examples of org.eclipse.jdt.internal.compiler.util.ManifestAnalyzer


      zip = manager.getZipFile(jarPath);
      ZipEntry manifest = zip.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$
      if (manifest == null)
        return null;
      // non-null implies regular file
      ManifestAnalyzer analyzer = new ManifestAnalyzer();
      inputStream = zip.getInputStream(manifest);
      boolean success = analyzer.analyzeManifestContents(inputStream);
      calledFileNames = analyzer.getCalledFileNames();
      if (!success || analyzer.getClasspathSectionsCount() == 1 && calledFileNames == null) {
        if (JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
          Util.verbose("Invalid Class-Path header in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$
        }
        return null;
      } else if (analyzer.getClasspathSectionsCount() > 1) {
        if (JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
          Util.verbose("Multiple Class-Path headers in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$
        }
        return null;
      }
View Full Code Here


      zip = manager.getZipFile(jarPath);
      ZipEntry manifest = zip.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$
      if (manifest == null)
        return null;
      // non-null implies regular file
      ManifestAnalyzer analyzer = new ManifestAnalyzer();
      inputStream = zip.getInputStream(manifest);
      boolean success = analyzer.analyzeManifestContents(inputStream);
      calledFileNames = analyzer.getCalledFileNames();
      if (!success || analyzer.getClasspathSectionsCount() == 1 && calledFileNames == null) {
        if (JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
          Util.verbose("Invalid Class-Path header in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$
        }
        return null;
      } else if (analyzer.getClasspathSectionsCount() > 1) {
        if (JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
          Util.verbose("Multiple Class-Path headers in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$
        }
        return null;
      }
View Full Code Here

    initialize();
    ArrayList result = new ArrayList();
    ZipEntry manifest = this.zipFile.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$
    if (manifest != null) { // non-null implies regular file
      inputStream = this.zipFile.getInputStream(manifest);
      ManifestAnalyzer analyzer = new ManifestAnalyzer();
      boolean success = analyzer.analyzeManifestContents(inputStream);
      List calledFileNames = analyzer.getCalledFileNames();
      if (problemReporter != null) {
        if (!success || analyzer.getClasspathSectionsCount() == 1 &&  calledFileNames == null) {
          problemReporter.invalidClasspathSection(getPath());
        } else if (analyzer.getClasspathSectionsCount() > 1) {
          problemReporter.multipleClasspathSections(getPath());
        }
      }
      if (calledFileNames != null) {
        Iterator calledFilesIterator = calledFileNames.iterator();
View Full Code Here

    initialize();
    ArrayList result = new ArrayList();
    ZipEntry manifest = this.zipFile.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$
    if (manifest != null) { // non-null implies regular file
      inputStream = this.zipFile.getInputStream(manifest);
      ManifestAnalyzer analyzer = new ManifestAnalyzer();
      boolean success = analyzer.analyzeManifestContents(inputStream);
      List calledFileNames = analyzer.getCalledFileNames();
      if (problemReporter != null) {
        if (!success || analyzer.getClasspathSectionsCount() == 1 &&  calledFileNames == null) {
          problemReporter.invalidClasspathSection(getPath());
        } else if (analyzer.getClasspathSectionsCount() > 1) {
          problemReporter.multipleClasspathSections(getPath());
        }
      }
      if (calledFileNames != null) {
        Iterator calledFilesIterator = calledFileNames.iterator();
View Full Code Here

    initialize();
    ArrayList result = new ArrayList();
    ZipEntry manifest = this.zipFile.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$
    if (manifest != null) { // non-null implies regular file
      inputStream = this.zipFile.getInputStream(manifest);
      ManifestAnalyzer analyzer = new ManifestAnalyzer();
      boolean success = analyzer.analyzeManifestContents(inputStream);
      List calledFileNames = analyzer.getCalledFileNames();
      if (problemReporter != null) {
        if (!success || analyzer.getClasspathSectionsCount() == 1 &&  calledFileNames == null) {
          problemReporter.invalidClasspathSection(getPath());
        } else if (analyzer.getClasspathSectionsCount() > 1) {
          problemReporter.multipleClasspathSections(getPath());
        }
      }
      if (calledFileNames != null) {
        Iterator calledFilesIterator = calledFileNames.iterator();
View Full Code Here

      zip = manager.getZipFile(jarPath);
      ZipEntry manifest = zip.getEntry("META-INF/MANIFEST.MF"); //$NON-NLS-1$
      if (manifest == null)
        return null;
      // non-null implies regular file
      ManifestAnalyzer analyzer = new ManifestAnalyzer();
      inputStream = zip.getInputStream(manifest);
      boolean success = analyzer.analyzeManifestContents(inputStream);
      calledFileNames = analyzer.getCalledFileNames();
      if (!success || analyzer.getClasspathSectionsCount() == 1 && calledFileNames == null) {
        if (JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
          Util.verbose("Invalid Class-Path header in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$
        }
        return null;
      } else if (analyzer.getClasspathSectionsCount() > 1) {
        if (JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
          Util.verbose("Multiple Class-Path headers in manifest of jar file: " + jarPath.toOSString()); //$NON-NLS-1$
        }
        return null;
      }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.util.ManifestAnalyzer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.