Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/hookconfigurators.properties2
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/patches/org.eclipse.osgi_patch_20060509.txt594
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java14
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IWeavingAdaptor.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IAspectJAdaptor.java)2
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptor.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/AspectJAdaptor.java)16
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptorFactory.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/AspectJAdaptorFactory.java)4
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingBundleFile.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractAJBundleFile.java)8
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingHook.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractAspectJHook.java)2
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseWeavingBundleFile.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseAjBundleFile.java)4
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BundleAdaptorProvider.java4
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedClassBundleEntry.java8
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedGeneratedClassBundleEntry.java8
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/IAdaptorProvider.java6
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java4
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleEntry.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJBundleEntry.java)10
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleFile.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJBundleFile.java)14
-rw-r--r--bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java (renamed from bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJHook.java)58
17 files changed, 82 insertions, 676 deletions
diff --git a/bundles/org.eclipse.equinox.weaving.hook/hookconfigurators.properties b/bundles/org.eclipse.equinox.weaving.hook/hookconfigurators.properties
index 8ade8522d..d3b464c13 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/hookconfigurators.properties
+++ b/bundles/org.eclipse.equinox.weaving.hook/hookconfigurators.properties
@@ -1,2 +1,2 @@
hook.configurators= \
- org.eclipse.equinox.weaving.hooks.AspectJHook
+ org.eclipse.equinox.weaving.hooks.WeavingHook
diff --git a/bundles/org.eclipse.equinox.weaving.hook/patches/org.eclipse.osgi_patch_20060509.txt b/bundles/org.eclipse.equinox.weaving.hook/patches/org.eclipse.osgi_patch_20060509.txt
deleted file mode 100644
index d03b0424b..000000000
--- a/bundles/org.eclipse.equinox.weaving.hook/patches/org.eclipse.osgi_patch_20060509.txt
+++ /dev/null
@@ -1,594 +0,0 @@
-### Eclipse Workspace Patch 1.0
-#P org.eclipse.osgi
-Index: core/adaptor/org/eclipse/osgi/service/resolver/BundleDescription.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/core/adaptor/org/eclipse/osgi/service/resolver/BundleDescription.java,v
-retrieving revision 1.11
-diff -u -r1.11 BundleDescription.java
---- core/adaptor/org/eclipse/osgi/service/resolver/BundleDescription.java 17 Mar 2006 14:46:43 -0000 1.11
-+++ core/adaptor/org/eclipse/osgi/service/resolver/BundleDescription.java 9 May 2006 21:27:12 -0000
-@@ -227,4 +227,27 @@
- * @return the list of execution environments that are required.
- */
- public String[] getExecutionEnvironments();
-+
-+ // AMC
-+ /**
-+ * Returns the supplemented import packages defined by the Supplement-Importer
-+ * clause.
-+ */
-+ public ImportPackageSpecification[] getSupplementedImportPackages();
-+
-+ /**
-+ * Returns the supplemented export packages defined by the Supplement-Exporter
-+ * clause.
-+ */
-+ public ImportPackageSpecification[] getSupplementedExportPackages();
-+
-+ //end AMC
-+
-+ //knibb
-+ /**
-+ * Returns the supplemented bundles defined by the Supplement-Bundle clause
-+ */
-+ public BundleDescription[] getSupplementedBundles();
-+ //end knibb
-+
- }
-Index: core/framework/org/eclipse/osgi/framework/internal/core/Constants.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Constants.java,v
-retrieving revision 1.29
-diff -u -r1.29 Constants.java
---- core/framework/org/eclipse/osgi/framework/internal/core/Constants.java 26 Oct 2005 17:58:14 -0000 1.29
-+++ core/framework/org/eclipse/osgi/framework/internal/core/Constants.java 9 May 2006 21:27:12 -0000
-@@ -268,4 +268,44 @@
- * @deprecated use {@link #ECLIPSE_LAZYSTART_EXCEPTIONS}
- */
- public static final String ECLIPSE_AUTOSTART_EXCEPTIONS = ECLIPSE_LAZYSTART_EXCEPTIONS;
-+
-+
-+ // Added by AMC
-+
-+ /**
-+ * Manifest header (named "Supplement-Importer") identifying the names
-+ * (and optionally, version numbers) of the packages that the bundle supplements.
-+ * All importers of one of these packages will have the exported packages of this
-+ * bundle added to their imports in addition.
-+ *
-+ * <p>
-+ * The attribute value may be retrieved from the <code>Dictionary</code>
-+ * object returned by the <code>Bundle.getHeaders</code> method.
-+ */
-+ public static final String SUPPLEMENT_IMPORTER = "Eclipse-SupplementImporter"; //$NON-NLS-1$
-+
-+ /**
-+ * Manifest header (named &quot;Supplement-Exporter&quot;) identifying the names
-+ * (and optionally, version numbers) of the packages that the bundle supplements.
-+ * All exporters of one of these packages will have the exported packages of this bundle
-+ * added to their imports list.
-+ *
-+ * <p>
-+ * The attribute value may be retrieved from the <code>Dictionary</code>
-+ * object returned by the <code>Bundle.getHeaders</code> method.
-+ */
-+ public static final String SUPPLEMENT_EXPORTER = "Eclipse-SupplementExporter"; //$NON-NLS-1$
-+
-+ //knibb
-+ /**
-+ * Manifest header (named &quot;Supplement-Bundle&quot;) identifying the names
-+ * (and optionally, version numbers) of any bundles supplemented by this bundle.
-+ * All supplemented bundles will have all the exported packages of this bundle
-+ * added to their imports list
-+ *
-+ * <p>
-+ * The attribute value may be retrieved from the <code>Dictionary</code>
-+ * object returned by the <code>Bundle.getHeaders</code> method.
-+ */
-+ public static final String SUPPLEMENT_BUNDLE = "Eclipse-SupplementBundle"; //$NON-NLS-1$
- }
-Index: resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java,v
-retrieving revision 1.46
-diff -u -r1.46 StateBuilder.java
---- resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java 24 Apr 2006 16:23:48 -0000 1.46
-+++ resolver/src/org/eclipse/osgi/internal/resolver/StateBuilder.java 9 May 2006 21:27:18 -0000
-@@ -101,6 +101,23 @@
- result.setGenericRequires(createGenericRequires(genericRequires));
- ManifestElement[] genericCapabilities = getGenericCapabilities(manifest, genericAliases);
- result.setGenericCapabilities(createGenericCapabilities(genericCapabilities));
-+
-+ // AMC addition
-+ ManifestElement[] supplementImporter = ManifestElement.parseHeader(Constants.SUPPLEMENT_IMPORTER, (String) manifest.get(Constants.SUPPLEMENT_IMPORTER));
-+ if (supplementImporter != null)
-+ result.setSupplementedImportPackages(createPackageSpecification(supplementImporter,manifestVersion));
-+ ManifestElement[] supplementExporter = ManifestElement.parseHeader(Constants.SUPPLEMENT_EXPORTER, (String) manifest.get(Constants.SUPPLEMENT_EXPORTER));
-+ if (supplementExporter != null)
-+ result.setSupplementedExportPackages(createPackageSpecification(supplementExporter,manifestVersion));
-+ // end AMC
-+
-+ //knibb
-+
-+ ManifestElement[] supplementBundle = ManifestElement.parseHeader(Constants.SUPPLEMENT_BUNDLE, (String) manifest.get(Constants.SUPPLEMENT_BUNDLE));
-+ if (supplementBundle != null)
-+ result.setSupplementedBundles(createBundleSpecification(supplementBundle,manifestVersion));
-+
-+ //end knibb
- return result;
- }
-
-@@ -544,4 +561,46 @@
- if (!hostName.equals(Constants.SYSTEM_BUNDLE_SYMBOLICNAME) && !hostName.equals(Constants.getInternalSymbolicName()))
- throw new BundleException(NLS.bind(StateMsg.HEADER_EXTENSION_ERROR, hostName));
- }
--}
-+
-+ // AMC
-+
-+ private static ImportPackageSpecification[] createPackageSpecification(ManifestElement[] packages, int manifestVersion) {
-+ ImportPackageSpecificationImpl[] result = new ImportPackageSpecificationImpl[packages.length];
-+ for (int p = 0; p < packages.length; p++) {
-+ String[] packagesNames = packages[p].getValueComponents();
-+ for (int i = 0; i < packagesNames.length; i++) {
-+ ImportPackageSpecificationImpl spec = new ImportPackageSpecificationImpl();
-+ spec.setName(packagesNames[i]);
-+ // set common attributes for both dynamic and static imports
-+ spec.setVersionRange(getVersionRange(manifestVersion < 2 ? packages[p].getAttribute(Constants.PACKAGE_SPECIFICATION_VERSION) : packages[p].getAttribute(Constants.VERSION_ATTRIBUTE)));
-+ spec.setBundleSymbolicName(packages[p].getAttribute(Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE));
-+ spec.setBundleVersionRange(getVersionRange(packages[p].getAttribute(Constants.BUNDLE_VERSION_ATTRIBUTE)));
-+ spec.setAttributes(getAttributes(packages[p],DEFINED_MATCHING_ATTRS));
-+ //spec.setPropagate(ManifestElement.getArrayFromList(packages[p].getDirective(Constants.GROUPING_DIRECTIVE)));
-+ spec.setDirective(Constants.RESOLUTION_DIRECTIVE,getResolution(packages[p].getDirective(Constants.RESOLUTION_DIRECTIVE)));
-+ result[p] = spec;
-+ }
-+ }
-+ return result;
-+ }
-+ //End AMC
-+
-+ //knibb
-+
-+ private static BundleDescription[] createBundleSpecification(ManifestElement[] bundles, int manifestVersion) {
-+ BundleDescriptionImpl[] result = new BundleDescriptionImpl[bundles.length];
-+ for (int b=0; b<bundles.length; b++) {
-+ String[] bundleNames = bundles[b].getValueComponents();
-+ for(int i=0; i<bundleNames.length; i++) {
-+ BundleDescriptionImpl spec = new BundleDescriptionImpl();
-+ spec.setName(bundleNames[i]);
-+ //TODO incomplete - only matches bundle name at this time
-+ result[b] = spec;
-+ }
-+ }
-+ return result;
-+ }
-+
-+
-+ //end knibb
-+}
-\ No newline at end of file
-Index: resolver/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java,v
-retrieving revision 1.6
-diff -u -r1.6 BundleSpecificationImpl.java
---- resolver/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java 12 Sep 2005 16:44:01 -0000 1.6
-+++ resolver/src/org/eclipse/osgi/internal/resolver/BundleSpecificationImpl.java 9 May 2006 21:27:17 -0000
-@@ -18,6 +18,14 @@
- private boolean exported;
- private boolean optional;
-
-+ // AMC
-+ public BundleSpecificationImpl() { /* empty */ }
-+
-+ public BundleSpecificationImpl(String name) {
-+ setName(name);
-+ }
-+ // End AMC
-+
- protected void setExported(boolean exported) {
- this.exported = exported;
- }
-Index: resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java,v
-retrieving revision 1.35
-diff -u -r1.35 BundleDescriptionImpl.java
---- resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java 17 Mar 2006 14:46:42 -0000 1.35
-+++ resolver/src/org/eclipse/osgi/internal/resolver/BundleDescriptionImpl.java 9 May 2006 21:27:17 -0000
-@@ -91,6 +91,35 @@
- return EMPTY_IMPORTS;
- return lazyData.importPackages;
- }
-+
-+ // AMC
-+
-+ public ImportPackageSpecification[] getSupplementedImportPackages() {
-+ fullyLoad();
-+ if (lazyData.supplementedImports == null)
-+ return new ImportPackageSpecification[0];
-+ return lazyData.supplementedImports;
-+ }
-+
-+ public ImportPackageSpecification[] getSupplementedExportPackages() {
-+ fullyLoad();
-+ if (lazyData.supplementedExports == null)
-+ return new ImportPackageSpecification[0];
-+ return lazyData.supplementedExports;
-+ }
-+
-+ // END AMC
-+
-+ //knibb
-+
-+ public BundleDescription[] getSupplementedBundles() {
-+ fullyLoad();
-+ if (lazyData.SupplementedBundles == null)
-+ return new BundleDescription[0];
-+ return lazyData.SupplementedBundles;
-+ }
-+
-+ //end knibb
-
- public BundleSpecification[] getRequiredBundles() {
- fullyLoad();
-@@ -224,6 +253,31 @@
- }
- }
-
-+ // AMC
-+
-+ protected void setSupplementedImportPackages(ImportPackageSpecification[] supplementedImports) {
-+ checkLazyData();
-+ lazyData.supplementedImports = supplementedImports;
-+ }
-+
-+
-+ protected void setSupplementedExportPackages(ImportPackageSpecification[] supplementedExports) {
-+ checkLazyData();
-+ lazyData.supplementedExports = supplementedExports;
-+ }
-+
-+ // END AMC
-+
-+ //knibb
-+
-+ protected void setSupplementedBundles(BundleDescription[] supplementedBundles) {
-+ checkLazyData();
-+ lazyData.SupplementedBundles = supplementedBundles;
-+ }
-+
-+ //end knibb
-+
-+
- protected void setRequiredBundles(BundleSpecification[] requiredBundles) {
- checkLazyData();
- lazyData.requiredBundles = requiredBundles;
-@@ -543,5 +597,11 @@
- String[] executionEnvironments;
-
- HashMap dynamicStamps;
-+
-+ // AMC
-+ ImportPackageSpecification[] supplementedImports;
-+ ImportPackageSpecification[] supplementedExports;
-+ //knibb
-+ BundleDescription[] SupplementedBundles;
- }
- }
-Index: resolver/src/org/eclipse/osgi/internal/module/ResolverBundle.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverBundle.java,v
-retrieving revision 1.20
-diff -u -r1.20 ResolverBundle.java
---- resolver/src/org/eclipse/osgi/internal/module/ResolverBundle.java 3 May 2006 13:35:59 -0000 1.20
-+++ resolver/src/org/eclipse/osgi/internal/module/ResolverBundle.java 9 May 2006 21:27:14 -0000
-@@ -252,6 +252,16 @@
- return allRequires[i];
- return null;
- }
-+
-+ // AMC
-+ void addRequired(BundleConstraint required) {
-+ BundleConstraint[] newRequires = new BundleConstraint[requires.length + 1];
-+ System.arraycopy(requires,0,newRequires,0,requires.length);
-+ newRequires[requires.length] = required;
-+ requires = newRequires;
-+ }
-+
-+ // End AMC
-
- public BundleDescription getBundle() {
- return (BundleDescription) getBaseDescription();
-@@ -494,4 +504,4 @@
- int getRefs() {
- return refs == null ? 0 : refs.size();
- }
--}
-+}
-\ No newline at end of file
-Index: resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java,v
-retrieving revision 1.35
-diff -u -r1.35 ResolverImpl.java
---- resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java 17 Apr 2006 20:22:58 -0000 1.35
-+++ resolver/src/org/eclipse/osgi/internal/module/ResolverImpl.java 9 May 2006 21:27:16 -0000
-@@ -15,6 +15,7 @@
- import org.eclipse.osgi.framework.debug.Debug;
- import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
- import org.eclipse.osgi.internal.resolver.BundleDescriptionImpl;
-+import org.eclipse.osgi.internal.resolver.BundleSpecificationImpl;
- import org.eclipse.osgi.service.resolver.*;
- import org.eclipse.osgi.util.ManifestElement;
- import org.osgi.framework.*;
-@@ -29,6 +30,7 @@
- private static final String OPTION_GENERICS = RESOLVER + "/generics"; //$NON-NLS-1$
- private static final String OPTION_GROUPING = RESOLVER + "/grouping"; //$NON-NLS-1$
- private static final String OPTION_CYCLES = RESOLVER + "/cycles"; //$NON-NLS-1$
-+ private static final String OPTION_SUPPLEMENTS = RESOLVER + "/supplements"; //$NON-NLS-1$
- public static boolean DEBUG = false;
- public static boolean DEBUG_WIRING = false;
- public static boolean DEBUG_IMPORTS = false;
-@@ -571,6 +573,7 @@
-
- // This method will attempt to resolve the supplied bundle and any bundles that it is dependent on
- private boolean resolveBundle(ResolverBundle bundle, ArrayList cycle) {
-+// System.out.println("ResolverImpl.resolveBundle() bundle=" + bundle.getName());
- if (bundle.isFragment())
- return false;
- if (!bundle.isResolvable()) {
-@@ -646,6 +649,100 @@
- }
- }
- }
-+
-+ // AMC
-+// System.err.println("? ResolverImpl.resolveBundle() bundle=" + bundle); //$NON-NLS-1$
-+ if (!failed) {
-+ // XXX this feels horribly inefficient...
-+ // Iterate thru resolver bundles looking for any supplementors of packages that this
-+ // bundle imports or exports. If we find a match, resolve it as a required bundle of
-+ // this bundle
-+ // Exports first
-+ ResolverExport[] exports = bundle.getExportPackages();
-+ outerExport: for (Iterator iter = resolverBundles.iterator(); iter.hasNext(); ) {
-+ Object[] suppliers = (Object[]) iter.next();
-+ //suppliers is an array of ResolverBundle objects. ResolverBundle is a subclass of VersionSupplier
-+ //so suppliers has type VersionSupplier[]
-+ //unfortunately this results in a ClassCastException so that is why this is an Object[] and not VersionSupplier[]
-+ for (int s = 0; s < suppliers.length; s++) {
-+ //the cast from Object to VersionSupplier is made here
-+ VersionSupplier supplier = (VersionSupplier) suppliers[s];
-+ BundleDescription desc = supplier.getBundle();
-+ ImportPackageSpecification[] supplements = desc.getSupplementedExportPackages();
-+ for (int i = 0; i < supplements.length; i++) {
-+ for (int e = 0; e < exports.length; e++) {
-+ if (supplements[i].getName().equals(exports[e].getName())) {
-+ // it's a match
-+ if(Debug.DEBUG_SUPPLEMENTS)
-+ System.out.println("export " + exports[i] + " supplemented by " + desc); //$NON-NLS-1$//$NON-NLS-2$
-+ // add suppliers[s].getBundle as a required bundle for me...
-+ addRequired(bundle,supplier.getBundle(), cycle);
-+ continue outerExport;
-+ }
-+ }
-+ }
-+ }
-+ }
-+ // Then imports
-+ ResolverImport[] imports = bundle.getImportPackages();
-+ outer: for (Iterator iter = resolverBundles.iterator(); iter.hasNext();) {
-+ Object[] suppliers = (Object[]) iter.next();
-+ for (int s = 0; s < suppliers.length; s++) {
-+ VersionSupplier supplier = (VersionSupplier) suppliers[s];
-+ BundleDescription desc = supplier.getBundle();
-+ ImportPackageSpecification[] supplements = desc.getSupplementedImportPackages();
-+ for (int i = 0; i < supplements.length; i++) {
-+ for (int j = 0; j < imports.length; j++) {
-+ ImportPackageSpecification possibleMatch = (ImportPackageSpecification) imports[j].getVersionConstraint();
-+ if (possibleMatch.getName().equals(supplements[i].getName())) {
-+ // we have a match
-+ if(Debug.DEBUG_SUPPLEMENTS)
-+ System.out.println("import " + imports[j] + " supplemented by " + desc); //$NON-NLS-1$ //$NON-NLS-2$
-+ addRequired(bundle,supplier.getBundle(), cycle);
-+ continue outer;
-+ }
-+ }
-+ }
-+ }
-+ }
-+ }
-+ // END AMC
-+
-+ //knibb
-+ //now check for any other bundles which supplement this bundle
-+ //TODO - would be usefull to have an exclusion mechanism here (e.g. you could then say someting like "supplement all bundles, except....")
-+ if(!failed) {
-+ String myName = bundle.getName();
-+ for (Iterator iter = resolverBundles.iterator(); iter.hasNext();) {
-+ Object[] suppliers = (Object[]) iter.next();
-+ outerBundles: for(int s=0; s < suppliers.length; s++){
-+ VersionSupplier supplier = (VersionSupplier) suppliers[s];
-+ BundleDescription desc = supplier.getBundle();
-+ //don't want to supplement ourselves so break if desc and bundle are the same
-+ if(bundle.getBundle().equals(desc)){
-+ continue outerBundles;
-+ }
-+ //supplemtor should not supplement any bundle on which it depends
-+ BundleSpecification[] bundlesRequiredBySupplementor = desc.getRequiredBundles();
-+ for(int i=0; i<bundlesRequiredBySupplementor.length; i++){
-+ if(bundlesRequiredBySupplementor[i].getName().equals( myName ))
-+ continue outerBundles; //avoid circular dependacy - do not allow a bundle to supplement any bundle on which it depends
-+ }
-+ BundleDescription[] supplemented = desc.getSupplementedBundles(); //the list of bundles it (desc) supplements
-+ for(int i=0; i<supplemented.length; i++){
-+// if ( myName.equals(supplemented[i].getName())){
-+ if ( equals_wild(supplemented[i].getName(), myName)){
-+ addRequired(bundle, desc, cycle);
-+ if(Debug.DEBUG_SUPPLEMENTS)
-+ System.out.println("bundle Supplement-Bundle: " + bundle + " supplemeted by [" + desc +"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-+ }
-+ }
-+ }
-+ }
-+ }
-+
-+ //end knibb
-+
- // Need to check that all mandatory imports are wired. If they are then
- // set the bundle RESOLVED, otherwise set it back to UNRESOLVED
- if (failed) {
-@@ -666,6 +763,16 @@
- return bundle.getState() != ResolverBundle.UNRESOLVED;
- }
-
-+ // AMC
-+ private void addRequired(ResolverBundle toBundle, BundleDescription toBeAdded, ArrayList cycle) {
-+ // TODO
-+ BundleSpecification spec = new BundleSpecificationImpl(toBeAdded.getName());
-+ BundleConstraint constraint = new BundleConstraint(toBundle,spec);
-+ if (resolveRequire(constraint, cycle)) {
-+ toBundle.addRequired(constraint);
-+ }
-+ }
-+
- private boolean resolveGenericReq(GenericConstraint constraint, ArrayList cycle) {
- if (DEBUG_REQUIRES)
- ResolverImpl.log("Trying to resolve: " + constraint.getBundle() + ", " + constraint.getVersionConstraint()); //$NON-NLS-1$ //$NON-NLS-2$
-@@ -1328,6 +1435,25 @@
- VersionHashMap getResolverExports() {
- return resolverExports;
- }
-+
-+ //knibb
-+ //test if two Strings are equal
-+ //with wild card support - only supports strings ending in *
-+ private boolean equals_wild(String input, String match){
-+ if(input.equals(match)){
-+ //its a match so just return true
-+ return true;
-+ }
-+ if(input.endsWith("*")==false){
-+ //no wildcards are being used here
-+ return false;
-+ }
-+ String wild_in = input.substring(0, input.length()-1);
-+ if(match.startsWith(wild_in))
-+ return true;
-+
-+ return false;
-+ }
-
- public void setSelectionPolicy(Comparator selectionPolicy) {
- this.selectionPolicy = selectionPolicy;
-Index: resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java,v
-retrieving revision 1.5
-diff -u -r1.5 VersionHashMap.java
---- resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java 23 Jan 2006 19:13:00 -0000 1.5
-+++ resolver/src/org/eclipse/osgi/internal/module/VersionHashMap.java 9 May 2006 21:27:16 -0000
-@@ -28,6 +28,14 @@
- for (int i = 0; i < versionSuppliers.length; i++)
- put(versionSuppliers[i].getName(), versionSuppliers[i]);
- }
-+
-+ // AMC
-+
-+ Iterator iterator() {
-+ return internal.values().iterator();
-+ }
-+
-+ // END AMC
-
- public void put(Object key, Object value) {
- super.put(key, value);
-Index: .options
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/.options,v
-retrieving revision 1.14
-diff -u -r1.14 .options
---- .options 1 May 2006 17:08:49 -0000 1.14
-+++ .options 9 May 2006 21:27:12 -0000
-@@ -23,6 +23,9 @@
- # Debug the loading of message bundles
- org.eclipse.osgi/debug/messageBundles=false
-
-+# Debug supplements mechanism
-+org.eclipse.osgi/debug/supplements=false
-+
- # Eclipse adaptor options
- org.eclipse.osgi/eclipseadaptor/debug = false
- org.eclipse.osgi/eclipseadaptor/debug/location = false
-Index: core/framework/org/eclipse/osgi/framework/debug/Debug.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/debug/Debug.java,v
-retrieving revision 1.17
-diff -u -r1.17 Debug.java
---- core/framework/org/eclipse/osgi/framework/debug/Debug.java 1 May 2006 15:37:20 -0000 1.17
-+++ core/framework/org/eclipse/osgi/framework/debug/Debug.java 9 May 2006 21:27:12 -0000
-@@ -90,6 +90,12 @@
- public static boolean MONITOR_ACTIVATION = false; // "monitor/bundles"
-
- /**
-+ * Show info about the supplements mechanism
-+ */
-+// public static boolean DEBUG_SUPPLEMENTS = Boolean.getBoolean("org.eclipse.osgi.showSupplementsInfo"); //$NON-NLS-1$ //$NON-NLS-2$
-+ public static boolean DEBUG_SUPPLEMENTS = false; // "debug/supplements"
-+
-+ /**
- * Base debug option key (org.eclispe.osgi).
- */
- public static final String ECLIPSE_OSGI = "org.eclipse.osgi"; //$NON-NLS-1$
-@@ -150,6 +156,10 @@
- * Message bundles Debug option key.
- */
- public static final String OPTION_DEBUG_MESSAGE_BUNDLES = ECLIPSE_OSGI + "/debug/messageBundles"; //$NON-NLS-1$
-+ /**
-+ * Supplements mechansism Debug option key.
-+ */
-+ public static final String OPTION_DEBUG_SUPPLEMENTS = ECLIPSE_OSGI + "/debug/supplements"; //$NON-NLS-1$
-
- static {
- FrameworkDebugOptions dbgOptions = FrameworkDebugOptions.getDefault();
-@@ -168,6 +178,7 @@
- DEBUG_PACKAGEADMIN = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGEADMIN, false);
- DEBUG_PACKAGEADMIN_TIMING = dbgOptions.getBooleanOption(OPTION_DEBUG_PACKAGEADMIN_TIMING, false) || dbgOptions.getBooleanOption("org.eclipse.core.runtime/debug", false); //$NON-NLS-1$
- DEBUG_MESSAGE_BUNDLES = dbgOptions.getBooleanOption(OPTION_DEBUG_MESSAGE_BUNDLES, false);
-+ DEBUG_SUPPLEMENTS = dbgOptions.getBooleanOption(OPTION_DEBUG_SUPPLEMENTS, false);
- MONITOR_ACTIVATION = dbgOptions.getBooleanOption(OPTION_MONITOR_ACTIVATION, false);
- }
- }
-@@ -351,4 +362,4 @@
- }
- }
-
--}
-+}
-\ No newline at end of file
-Index: defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java
-===================================================================
-RCS file: /home/eclipse/org.eclipse.osgi/defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java,v
-retrieving revision 1.6
-diff -u -r1.6 ClasspathManager.java
---- defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java 1 May 2006 14:14:24 -0000 1.6
-+++ defaultAdaptor/src/org/eclipse/osgi/baseadaptor/loader/ClasspathManager.java 9 May 2006 21:27:14 -0000
-@@ -68,6 +68,10 @@
- * </p>
- */
- public void initialize() {
-+// String bundleName = data.getSymbolicName();
-+// if (bundleName.equals("org.eclipse.osgi.aspectj.tests")) {
-+// System.out.println("? ClasspathManager.initialize() bundle=" + bundleName);
-+// }
- entries = buildClasspath(classpath, this, data, classloader.getDomain());
- ClassLoadingHook[] hooks = data.getAdaptor().getHookRegistry().getClassLoadingHooks();
- for (int i = 0; i < hooks.length; i++)
-@@ -530,4 +534,4 @@
- return classloader;
- }
-
--}
-+}
-\ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java
index 2a35339c5..74a8fcd53 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/Debug.java
@@ -15,7 +15,7 @@ import org.eclipse.osgi.framework.debug.FrameworkDebugOptions;
public class Debug {
- public static final String ASPECTJ_OSGI = "org.aspectj.osgi";
+ public static final String ASPECTJ_OSGI = "org.eclipse.equinox.weaving.hook"; //$NON-NLS-1$
public static boolean DEBUG_BUNDLE;
@@ -30,21 +30,21 @@ public class Debug {
public static boolean DEBUG_WEAVE;
public static final String OPTION_DEBUG_BUNDLE = ASPECTJ_OSGI
- + "/debug/bundle";
+ + "/debug/bundle"; //$NON-NLS-1$
public static final String OPTION_DEBUG_BUNDLENAME = ASPECTJ_OSGI
- + "/debug/bundleName";
+ + "/debug/bundleName"; //$NON-NLS-1$
public static final String OPTION_DEBUG_CACHE = ASPECTJ_OSGI
- + "/debug/cache";
+ + "/debug/cache"; //$NON-NLS-1$
- public static final String OPTION_DEBUG_GENERAL = ASPECTJ_OSGI + "/debug";
+ public static final String OPTION_DEBUG_GENERAL = ASPECTJ_OSGI + "/debug"; //$NON-NLS-1$
public static final String OPTION_DEBUG_SUPPLEMENTS = ASPECTJ_OSGI
- + "/debug/supplements";
+ + "/debug/supplements"; //$NON-NLS-1$
public static final String OPTION_DEBUG_WEAVE = ASPECTJ_OSGI
- + "/debug/weave";
+ + "/debug/weave"; //$NON-NLS-1$
static {
final FrameworkDebugOptions fdo = FrameworkDebugOptions.getDefault();
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IAspectJAdaptor.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IWeavingAdaptor.java
index 05f84c84d..a1f36272b 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IAspectJAdaptor.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/IWeavingAdaptor.java
@@ -17,7 +17,7 @@ import java.net.URL;
import org.eclipse.equinox.service.weaving.CacheEntry;
import org.eclipse.osgi.baseadaptor.loader.BaseClassLoader;
-public interface IAspectJAdaptor {
+public interface IWeavingAdaptor {
public CacheEntry findClass(String name, URL sourceFileURL);
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/AspectJAdaptor.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptor.java
index 567477172..20d50745d 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/AspectJAdaptor.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptor.java
@@ -23,7 +23,7 @@ import java.util.Set;
import org.eclipse.equinox.service.weaving.CacheEntry;
import org.eclipse.equinox.service.weaving.ICachingService;
import org.eclipse.equinox.service.weaving.IWeavingService;
-import org.eclipse.equinox.weaving.hooks.AspectJBundleFile;
+import org.eclipse.equinox.weaving.hooks.WeavingBundleFile;
import org.eclipse.osgi.baseadaptor.BaseData;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
import org.eclipse.osgi.baseadaptor.loader.BaseClassLoader;
@@ -31,7 +31,7 @@ import org.eclipse.osgi.framework.internal.core.BundleFragment;
import org.eclipse.osgi.framework.internal.core.BundleHost;
import org.osgi.framework.Bundle;
-public class AspectJAdaptor implements IAspectJAdaptor {
+public class WeavingAdaptor implements IWeavingAdaptor {
private static class ThreadLocalSet extends ThreadLocal {
@@ -72,7 +72,7 @@ public class AspectJAdaptor implements IAspectJAdaptor {
private final BaseData data;
- private final AspectJAdaptorFactory factory;
+ private final WeavingAdaptorFactory factory;
private boolean initialized = false;
@@ -80,8 +80,8 @@ public class AspectJAdaptor implements IAspectJAdaptor {
private IWeavingService weavingService;
- public AspectJAdaptor(final BaseData baseData,
- final AspectJAdaptorFactory serviceFactory,
+ public WeavingAdaptor(final BaseData baseData,
+ final WeavingAdaptorFactory serviceFactory,
final BaseClassLoader baseClassLoader,
final IWeavingService weavingService,
final ICachingService cachingService) {
@@ -147,10 +147,10 @@ public class AspectJAdaptor implements IAspectJAdaptor {
final BaseData hostData = (BaseData) host.getBundleData();
// System.err.println("? AspectJAdaptor.initialize() bundleData=" + hostData);
final BundleFile bundleFile = hostData.getBundleFile();
- if (bundleFile instanceof AspectJBundleFile) {
- final AspectJBundleFile hostFile = (AspectJBundleFile) bundleFile;
+ if (bundleFile instanceof WeavingBundleFile) {
+ final WeavingBundleFile hostFile = (WeavingBundleFile) bundleFile;
// System.err.println("? AspectJAdaptor.initialize() bundleFile=" + hostFile);
- final AspectJAdaptor hostAdaptor = (AspectJAdaptor) hostFile
+ final WeavingAdaptor hostAdaptor = (WeavingAdaptor) hostFile
.getAdaptor();
// System.err.println("? AspectJAdaptor.initialize() bundleFile=" + hostAdaptor);
weavingService = hostAdaptor.weavingService;
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/AspectJAdaptorFactory.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptorFactory.java
index 7f4d565c9..efbd370b1 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/AspectJAdaptorFactory.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/adaptors/WeavingAdaptorFactory.java
@@ -44,7 +44,7 @@ import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.service.startlevel.StartLevel;
import org.osgi.util.tracker.ServiceTracker;
-public class AspectJAdaptorFactory {
+public class WeavingAdaptorFactory {
private static final Collection IGNORE_WEAVING_SERVICE_BUNDLES = Arrays
.asList(new String[] { "org.eclipse.equinox.weaving.aspectj",
@@ -76,7 +76,7 @@ public class AspectJAdaptorFactory {
private final Map weavingServices = Collections
.synchronizedMap(new HashMap());
- public AspectJAdaptorFactory() {
+ public WeavingAdaptorFactory() {
}
public void dispose(final BundleContext context) {
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractAJBundleFile.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingBundleFile.java
index 38e73c4b7..ecc67bed4 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractAJBundleFile.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingBundleFile.java
@@ -18,17 +18,17 @@ import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;
-import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
-public abstract class AbstractAJBundleFile extends BundleFile {
+public abstract class AbstractWeavingBundleFile extends BundleFile {
protected BundleFile delegate;
private final BundleAdaptorProvider adaptorProvider;
- public AbstractAJBundleFile(final BundleAdaptorProvider adaptorProvider,
+ public AbstractWeavingBundleFile(final BundleAdaptorProvider adaptorProvider,
final BundleFile bundleFile) {
super(bundleFile.getBaseFile());
this.adaptorProvider = adaptorProvider;
@@ -54,7 +54,7 @@ public abstract class AbstractAJBundleFile extends BundleFile {
/**
* @return
*/
- public IAspectJAdaptor getAdaptor() {
+ public IWeavingAdaptor getAdaptor() {
return this.adaptorProvider.getAdaptor();
}
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractAspectJHook.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingHook.java
index 7166efd23..ad1438dfe 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractAspectJHook.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AbstractWeavingHook.java
@@ -46,7 +46,7 @@ import org.osgi.framework.BundleException;
* @author Matthew Webster
* @author Martin Lippert
*/
-public abstract class AbstractAspectJHook implements HookConfigurator,
+public abstract class AbstractWeavingHook implements HookConfigurator,
AdaptorHook, BundleFileWrapperFactoryHook, ClassLoadingHook,
ClassLoadingStatsHook, IAdaptorProvider {
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseAjBundleFile.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseWeavingBundleFile.java
index b5b04e6b2..57bcb2439 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseAjBundleFile.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BaseWeavingBundleFile.java
@@ -16,9 +16,9 @@ import java.io.IOException;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
-public class BaseAjBundleFile extends AspectJBundleFile {
+public class BaseWeavingBundleFile extends WeavingBundleFile {
- public BaseAjBundleFile(final BundleAdaptorProvider adaptorProvider,
+ public BaseWeavingBundleFile(final BundleAdaptorProvider adaptorProvider,
final BundleFile bundleFile) throws IOException {
super(adaptorProvider, bundleFile);
}
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BundleAdaptorProvider.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BundleAdaptorProvider.java
index 4e8368f5b..db49cf62e 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BundleAdaptorProvider.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/BundleAdaptorProvider.java
@@ -1,7 +1,7 @@
package org.eclipse.equinox.weaving.hooks;
-import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
import org.eclipse.osgi.baseadaptor.BaseData;
import org.eclipse.osgi.framework.internal.core.BundleFragment;
@@ -17,7 +17,7 @@ public class BundleAdaptorProvider {
this.adaptorProvider = adaptorProvider;
}
- public IAspectJAdaptor getAdaptor() {
+ public IWeavingAdaptor getAdaptor() {
if (this.baseData.getBundle() instanceof BundleFragment) {
return this.adaptorProvider.getHostBundleAdaptor(this.baseData
.getBundleID());
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedClassBundleEntry.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedClassBundleEntry.java
index 230a23ed1..d2897b9d1 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedClassBundleEntry.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedClassBundleEntry.java
@@ -15,12 +15,12 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
public class CachedClassBundleEntry extends BundleEntry {
- private final IAspectJAdaptor adaptor;
+ private final IWeavingAdaptor adaptor;
private final URL bundleFileURL;
@@ -30,7 +30,7 @@ public class CachedClassBundleEntry extends BundleEntry {
private final String name;
- public CachedClassBundleEntry(final IAspectJAdaptor aspectjAdaptor,
+ public CachedClassBundleEntry(final IWeavingAdaptor aspectjAdaptor,
final BundleEntry delegate, final String name, final byte[] bytes,
final URL url) {
this.adaptor = aspectjAdaptor;
@@ -44,7 +44,7 @@ public class CachedClassBundleEntry extends BundleEntry {
return true;
}
- public IAspectJAdaptor getAdaptor() {
+ public IWeavingAdaptor getAdaptor() {
return adaptor;
}
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedGeneratedClassBundleEntry.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedGeneratedClassBundleEntry.java
index 8ce597bc1..c2dedf40c 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedGeneratedClassBundleEntry.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/CachedGeneratedClassBundleEntry.java
@@ -16,12 +16,12 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
public class CachedGeneratedClassBundleEntry extends BundleEntry {
- private final IAspectJAdaptor adaptor;
+ private final IWeavingAdaptor adaptor;
private final URL bundleFileURL;
@@ -29,7 +29,7 @@ public class CachedGeneratedClassBundleEntry extends BundleEntry {
private final String name;
- public CachedGeneratedClassBundleEntry(final IAspectJAdaptor adaptor,
+ public CachedGeneratedClassBundleEntry(final IWeavingAdaptor adaptor,
final String path, final byte[] cachedBytes, final URL url) {
this.adaptor = adaptor;
this.bundleFileURL = url;
@@ -41,7 +41,7 @@ public class CachedGeneratedClassBundleEntry extends BundleEntry {
return true;
}
- public IAspectJAdaptor getAdaptor() {
+ public IWeavingAdaptor getAdaptor() {
return adaptor;
}
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/IAdaptorProvider.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/IAdaptorProvider.java
index 5fa5bc026..0f39fc983 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/IAdaptorProvider.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/IAdaptorProvider.java
@@ -1,12 +1,12 @@
package org.eclipse.equinox.weaving.hooks;
-import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
public interface IAdaptorProvider {
- public IAspectJAdaptor getAdaptor(long bundleID);
+ public IWeavingAdaptor getAdaptor(long bundleID);
- public IAspectJAdaptor getHostBundleAdaptor(long bundleID);
+ public IWeavingAdaptor getHostBundleAdaptor(long bundleID);
}
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java
index 4726309fe..d37a0f973 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/SupplementerRegistry.java
@@ -257,7 +257,7 @@ public class SupplementerRegistry implements ISupplementerRegistry {
final Supplementer supplementer = supplementers.get(bundle
.getSymbolicName());
supplementers.remove(bundle.getSymbolicName());
- if (AbstractAspectJHook.verbose)
+ if (AbstractWeavingHook.verbose)
System.err
.println("[org.eclipse.equinox.weaving.hook] info removing supplementer " //$NON-NLS-1$
+ bundle.getSymbolicName());
@@ -391,7 +391,7 @@ public class SupplementerRegistry implements ISupplementerRegistry {
final Bundle[] bundles = bundlesToRefresh
.toArray(new Bundle[bundlesToRefresh.size()]);
- if (AbstractAspectJHook.verbose) {
+ if (AbstractWeavingHook.verbose) {
for (int i = 0; i < bundles.length; i++) {
System.out.println("refresh bundle: "
+ bundles[i].getSymbolicName());
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJBundleEntry.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleEntry.java
index 5d0f8914d..4ec862d77 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJBundleEntry.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleEntry.java
@@ -18,12 +18,12 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
-public class AspectJBundleEntry extends BundleEntry {
+public class WeavingBundleEntry extends BundleEntry {
- private final IAspectJAdaptor adaptor;
+ private final IWeavingAdaptor adaptor;
private final URL bundleFileURL;
@@ -31,7 +31,7 @@ public class AspectJBundleEntry extends BundleEntry {
private final boolean dontWeave;
- public AspectJBundleEntry(final IAspectJAdaptor aspectjAdaptor,
+ public WeavingBundleEntry(final IWeavingAdaptor aspectjAdaptor,
final BundleEntry delegate, final URL url, final boolean dontWeave) {
this.adaptor = aspectjAdaptor;
this.bundleFileURL = url;
@@ -43,7 +43,7 @@ public class AspectJBundleEntry extends BundleEntry {
return dontWeave;
}
- public IAspectJAdaptor getAdaptor() {
+ public IWeavingAdaptor getAdaptor() {
return adaptor;
}
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJBundleFile.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleFile.java
index a93b0b212..fe5f47fbc 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJBundleFile.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingBundleFile.java
@@ -19,7 +19,7 @@ import java.net.URL;
import org.eclipse.equinox.service.weaving.CacheEntry;
import org.eclipse.equinox.weaving.adaptors.Debug;
-import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
@@ -30,7 +30,7 @@ import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
* Those bundle entry objects are used to return class bytes from the cache
* instead of the bundle itself.
*/
-public class AspectJBundleFile extends AbstractAJBundleFile {
+public class WeavingBundleFile extends AbstractWeavingBundleFile {
private final URL url;
@@ -42,7 +42,7 @@ public class AspectJBundleFile extends AbstractAJBundleFile {
* @param bundleFile The wrapped bundle file
* @throws IOException
*/
- public AspectJBundleFile(final BundleAdaptorProvider adaptorProvider,
+ public WeavingBundleFile(final BundleAdaptorProvider adaptorProvider,
final BundleFile bundleFile) throws IOException {
super(adaptorProvider, bundleFile);
this.url = delegate.getBaseFile().toURL();
@@ -58,11 +58,11 @@ public class AspectJBundleFile extends AbstractAJBundleFile {
if (path.endsWith(".class") && entry != null) {
final int offset = path.lastIndexOf('.');
final String name = path.substring(0, offset).replace('/', '.');
- final IAspectJAdaptor adaptor = getAdaptor();
+ final IWeavingAdaptor adaptor = getAdaptor();
if (adaptor != null) {
final CacheEntry cacheEntry = adaptor.findClass(name, url);
if (cacheEntry == null) {
- entry = new AspectJBundleEntry(adaptor, entry, url, false);
+ entry = new WeavingBundleEntry(adaptor, entry, url, false);
if (Debug.DEBUG_BUNDLE)
Debug.println("- AspectJBundleFile.getEntry() path="
+ path + ", entry=" + entry);
@@ -70,14 +70,14 @@ public class AspectJBundleFile extends AbstractAJBundleFile {
entry = new CachedClassBundleEntry(adaptor, entry, path,
cacheEntry.getCachedBytes(), url);
} else {
- entry = new AspectJBundleEntry(adaptor, entry, url,
+ entry = new WeavingBundleEntry(adaptor, entry, url,
cacheEntry.dontWeave());
}
}
} else if (path.endsWith(".class") && entry == null) {
final int offset = path.lastIndexOf('.');
final String name = path.substring(0, offset).replace('/', '.');
- final IAspectJAdaptor adaptor = getAdaptor();
+ final IWeavingAdaptor adaptor = getAdaptor();
if (adaptor != null) {
final CacheEntry cacheEntry = adaptor.findClass(name, url);
if (cacheEntry != null && cacheEntry.getCachedBytes() != null) {
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJHook.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java
index a8c62c5f1..a2e2f7c46 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/AspectJHook.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java
@@ -19,10 +19,10 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.equinox.service.weaving.ISupplementerRegistry;
-import org.eclipse.equinox.weaving.adaptors.AspectJAdaptor;
-import org.eclipse.equinox.weaving.adaptors.AspectJAdaptorFactory;
+import org.eclipse.equinox.weaving.adaptors.WeavingAdaptor;
+import org.eclipse.equinox.weaving.adaptors.WeavingAdaptorFactory;
import org.eclipse.equinox.weaving.adaptors.Debug;
-import org.eclipse.equinox.weaving.adaptors.IAspectJAdaptor;
+import org.eclipse.equinox.weaving.adaptors.IWeavingAdaptor;
import org.eclipse.osgi.baseadaptor.BaseData;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry;
import org.eclipse.osgi.baseadaptor.bundlefile.BundleFile;
@@ -35,22 +35,22 @@ import org.osgi.framework.BundleException;
import org.osgi.framework.ServiceReference;
import org.osgi.service.packageadmin.PackageAdmin;
-public class AspectJHook extends AbstractAspectJHook {
+public class WeavingHook extends AbstractWeavingHook {
- private final AspectJAdaptorFactory adaptorFactory;
+ private final WeavingAdaptorFactory adaptorFactory;
- private final Map<Long, IAspectJAdaptor> adaptors;
+ private final Map<Long, IWeavingAdaptor> adaptors;
private BundleContext bundleContext;
- public AspectJHook() {
+ public WeavingHook() {
if (Debug.DEBUG_GENERAL) Debug.println("- AspectJHook.<init>()");
- this.adaptorFactory = new AspectJAdaptorFactory();
- this.adaptors = new HashMap<Long, IAspectJAdaptor>();
+ this.adaptorFactory = new WeavingAdaptorFactory();
+ this.adaptors = new HashMap<Long, IWeavingAdaptor>();
}
/**
- * @see org.eclipse.equinox.weaving.hooks.AbstractAspectJHook#frameworkStart(org.osgi.framework.BundleContext)
+ * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#frameworkStart(org.osgi.framework.BundleContext)
*/
@Override
public void frameworkStart(final BundleContext context)
@@ -60,7 +60,7 @@ public class AspectJHook extends AbstractAspectJHook {
}
/**
- * @see org.eclipse.equinox.weaving.hooks.AbstractAspectJHook#frameworkStop(org.osgi.framework.BundleContext)
+ * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#frameworkStop(org.osgi.framework.BundleContext)
*/
@Override
public void frameworkStop(final BundleContext context)
@@ -68,11 +68,11 @@ public class AspectJHook extends AbstractAspectJHook {
adaptorFactory.dispose(context);
}
- public IAspectJAdaptor getAdaptor(final long bundleID) {
+ public IWeavingAdaptor getAdaptor(final long bundleID) {
return this.adaptors.get(bundleID);
}
- public IAspectJAdaptor getHostBundleAdaptor(final long bundleID) {
+ public IWeavingAdaptor getHostBundleAdaptor(final long bundleID) {
final Bundle bundle = this.bundleContext.getBundle(bundleID);
if (bundle != null) {
final Bundle host = adaptorFactory.getHost(bundle);
@@ -85,7 +85,7 @@ public class AspectJHook extends AbstractAspectJHook {
}
/**
- * @see org.eclipse.equinox.weaving.hooks.AbstractAspectJHook#initializedClassLoader(org.eclipse.osgi.baseadaptor.loader.BaseClassLoader,
+ * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#initializedClassLoader(org.eclipse.osgi.baseadaptor.loader.BaseClassLoader,
* org.eclipse.osgi.baseadaptor.BaseData)
*/
@Override
@@ -98,7 +98,7 @@ public class AspectJHook extends AbstractAspectJHook {
+ baseClassLoader + ", data=" + data
+ ", bundleFile=" + data.getBundleFile());
- final IAspectJAdaptor adaptor = createAspectJAdaptor(data);
+ final IWeavingAdaptor adaptor = createAspectJAdaptor(data);
adaptor.setBaseClassLoader(baseClassLoader);
adaptor.initialize();
this.adaptors.put(data.getBundleID(), adaptor);
@@ -109,7 +109,7 @@ public class AspectJHook extends AbstractAspectJHook {
}
/**
- * @see org.eclipse.equinox.weaving.hooks.AbstractAspectJHook#processClass(java.lang.String,
+ * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#processClass(java.lang.String,
* byte[], org.eclipse.osgi.baseadaptor.loader.ClasspathEntry,
* org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry,
* org.eclipse.osgi.baseadaptor.loader.ClasspathManager)
@@ -119,10 +119,10 @@ public class AspectJHook extends AbstractAspectJHook {
final ClasspathEntry classpathEntry, final BundleEntry entry,
final ClasspathManager manager) {
byte[] newClassytes = null;
- if (entry instanceof AspectJBundleEntry) {
- final AspectJBundleEntry ajBundleEntry = (AspectJBundleEntry) entry;
+ if (entry instanceof WeavingBundleEntry) {
+ final WeavingBundleEntry ajBundleEntry = (WeavingBundleEntry) entry;
if (!ajBundleEntry.dontWeave()) {
- final IAspectJAdaptor adaptor = ajBundleEntry.getAdaptor();
+ final IWeavingAdaptor adaptor = ajBundleEntry.getAdaptor();
newClassytes = adaptor.weaveClass(name, classbytes);
}
}
@@ -130,7 +130,7 @@ public class AspectJHook extends AbstractAspectJHook {
}
/**
- * @see org.eclipse.equinox.weaving.hooks.AbstractAspectJHook#recordClassDefine(java.lang.String,
+ * @see org.eclipse.equinox.weaving.hooks.AbstractWeavingHook#recordClassDefine(java.lang.String,
* java.lang.Class, byte[],
* org.eclipse.osgi.baseadaptor.loader.ClasspathEntry,
* org.eclipse.osgi.baseadaptor.bundlefile.BundleEntry,
@@ -140,10 +140,10 @@ public class AspectJHook extends AbstractAspectJHook {
public void recordClassDefine(final String name, final Class clazz,
final byte[] classbytes, final ClasspathEntry classpathEntry,
final BundleEntry entry, final ClasspathManager manager) {
- if (entry instanceof AspectJBundleEntry) {
- final AspectJBundleEntry ajBundleEntry = (AspectJBundleEntry) entry;
+ if (entry instanceof WeavingBundleEntry) {
+ final WeavingBundleEntry ajBundleEntry = (WeavingBundleEntry) entry;
if (!ajBundleEntry.dontWeave()) {
- final IAspectJAdaptor adaptor = ajBundleEntry.getAdaptor();
+ final IWeavingAdaptor adaptor = ajBundleEntry.getAdaptor();
final URL sourceFileURL = ajBundleEntry.getBundleFileURL();
adaptor.storeClass(name, sourceFileURL, clazz, classbytes);
}
@@ -171,10 +171,10 @@ public class AspectJHook extends AbstractAspectJHook {
+ bundleFile.getBaseFile());
if (base) {
- wrapped = new BaseAjBundleFile(
+ wrapped = new BaseWeavingBundleFile(
new BundleAdaptorProvider(data, this), bundleFile);
} else {
- wrapped = new AspectJBundleFile(new BundleAdaptorProvider(data,
+ wrapped = new WeavingBundleFile(new BundleAdaptorProvider(data,
this), bundleFile);
}
if (Debug.DEBUG_BUNDLE)
@@ -184,14 +184,14 @@ public class AspectJHook extends AbstractAspectJHook {
return wrapped;
}
- private IAspectJAdaptor createAspectJAdaptor(final BaseData baseData) {
+ private IWeavingAdaptor createAspectJAdaptor(final BaseData baseData) {
if (Debug.DEBUG_GENERAL)
Debug.println("> AspectJHook.createAspectJAdaptor() location="
+ baseData.getLocation());
- IAspectJAdaptor adaptor = null;
+ IWeavingAdaptor adaptor = null;
if (adaptorFactory != null) {
- adaptor = new AspectJAdaptor(baseData, adaptorFactory, null, null,
+ adaptor = new WeavingAdaptor(baseData, adaptorFactory, null, null,
null);
} else {
if (Debug.DEBUG_GENERAL)
@@ -205,7 +205,7 @@ public class AspectJHook extends AbstractAspectJHook {
return adaptor;
}
- private IAspectJAdaptor getAspectJAdaptor(final BaseData data) {
+ private IWeavingAdaptor getAspectJAdaptor(final BaseData data) {
return getAdaptor(data.getBundleID());
}

Back to the top