Skip to main content
summaryrefslogtreecommitdiffstats
blob: b2d0fe4c2bac2243e9bcdf71e9a1d2bd8be7745e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*******************************************************************************
 * Copyright (c) 2006 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:
 *   David Knibb               initial implementation      
 *   Matthew Webster           Eclipse 3.2 changes     
 *******************************************************************************/

package org.eclipse.equinox.weaving.hooks;

import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;

import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;

public abstract class AbstractAJBundleFile extends BundleFile {

	protected IAspectJAdaptor adaptor;
	protected BundleFile delegate;
	
	public AbstractAJBundleFile (IAspectJAdaptor aspectjAdaptor, BundleFile bundleFile) {
		super(bundleFile.getBaseFile());
		this.adaptor = aspectjAdaptor;
		this.delegate = bundleFile;
	}
	
	public File getBaseFile() {
		File baseFile = delegate.getBaseFile();
		return baseFile;
	}

	/**
	 * @deprecated
	 */
	public URL getResourceURL(String path, long hostBundleID, int index) {
		return delegate.getResourceURL(path, hostBundleID, index);
	}

	/**
	 * @deprecated
	 */
	public URL getResourceURL(String path, long hostBundleID) {
		return delegate.getResourceURL(path, hostBundleID);
	}

	public void close() throws IOException {
		delegate.close();
	}

	public boolean containsDir(String dir) {
		return delegate.containsDir(dir);
	}

	public BundleEntry getEntry(String path) {
		return delegate.getEntry(path);
	}

	public Enumeration getEntryPaths(String path) {
		return delegate.getEntryPaths(path);
	}

	public File getFile(String path, boolean nativeCode) {
		return delegate.getFile(path, nativeCode);
	}

	public void open() throws IOException {
		delegate.open();
	}

	public IAspectJAdaptor getAdaptor() {
		return adaptor;
	}

}

Back to the top