Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2005, 2009 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.core.runtime.internal.adaptor;
public class ClasspathManifest implements KeyedElement {
	public static final Object KEY = new Object();
	public static final int HASHCODE = .hashCode();
	private Manifest manifest;
	private boolean initialized = false;
	public int getKeyHashCode() {
		return ;
	}
	public boolean compare(KeyedElement other) {
		return other.getKey() == ;
	}
	public Object getKey() {
		return ;
	}
	public synchronized Manifest getManifest(ClasspathEntry cpEntryClasspathManager loader) {
			return ;
		if (!hasPackageInfo(cpEntryloader)) {
			 = true;
			 = null;
			return ;
		}
		if (mfEntry != null) {
			InputStream manIn = null;
			try {
				try {
					manIn = mfEntry.getInputStream();
					 = new Manifest(manIn);
finally {
					if (manIn != null)
						manIn.close();
				}
catch (IOException e) {
				// do nothing
			}
		}
		 = true;
		return ;
	}
	private boolean hasPackageInfo(ClasspathEntry cpEntryClasspathManager loader) {
		BaseData bundledata = null;
		if (cpEntry.getBundleFile() == loader.getBaseData().getBundleFile())
			bundledata = loader.getBaseData();
		if (bundledata == null) {
			FragmentClasspath[] fragCPs = loader.getFragmentClasspaths();
			if (fragCPs != null)
				for (int i = 0; i < fragCPs.lengthi++)
					if (cpEntry.getBundleFile() == fragCPs[i].getBundleData().getBundleFile()) {
						bundledata = fragCPs[i].getBundleData();
						break;
					}
		}
		if (bundledata == null)
			return true;
		return storageHook == null ? true : storageHook.hasPackageInfo();
	}
New to GrepCode? Check out our FAQ X