package org.openengsb.labs.delegation.service.internal;

import java.util.Map;
import java.util.Set;

import org.osgi.framework.Bundle;

public class ClassProviderWithAliases extends ClassProviderImpl {

    private Map<String, String> aliases;

    public ClassProviderWithAliases(Bundle bundle, Set<String> classes, Map<String, String> aliases) {
        super(bundle, classes);
        this.aliases = aliases;
    }

    @Override
    public Class<?> loadClass(String name) throws ClassNotFoundException {
        if (aliases.containsKey(name)) {
            return super.loadClass(aliases.get(name));
        }
        return super.loadClass(name);
    }

}

@@ -67,19 +67,26 @@
 va.util.
-Map
+Collection
 ;%0Aimport
@@ -96,19 +96,19 @@
 va.util.
-Set
+Map
 ;%0A%0Aimpor
@@ -301,19 +301,197 @@
 le, 
-Set%3CString%3E
+Collection%3CString%3E classes, Map%3CString, String%3E aliases) %7B%0A        super(bundle, classes);%0A        this.aliases = aliases;%0A    %7D%0A%0A    public ClassProviderWithAliases(Bundle bundle, String%5B%5D
  cla

use more sane constructors in ClassProviderWithAliases