Bug 10654 Allow all jars in a folder to be added to build path
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElement.java
private IClasspathEntry fCachedEntry;
	
	
	
	public CPListElement(int entryKind, IPath path, IResource res, IPath attachPath, IPath attachRoot, boolean isExported) {
		fEntryKind= entryKind;
		fPath= path;
		fSourceAttachmentPath= attachPath;
		fSourceAttachmentPrefix= attachRoot;	
		fJavadocLocation= null;
		fResource= res;
		fIsMissing= false;
		fIsExported= isExported;
		fCachedEntry= null;
	}
	public CPListElement(int entryKind, IPath path, IResource res) {
		this(entryKind, path, res, null, null, false);
	}
	
	public IClasspathEntry getClasspathEntry() {
		if (fCachedEntry == null) {
			fCachedEntry= newClasspathEntry();
		}
		return fCachedEntry;
	}
	
	private IClasspathEntry newClasspathEntry() {
		switch (fEntryKind) {
			case IClasspathEntry.CPE_SOURCE:
				return JavaCore.newSourceEntry(fPath);