Class classType = loader.loadClass(type);
if (key == null)
{
if (component.isMultiInstance())
{
container.registerComponent(new ConstructorInjectionComponentAdapter(classType, classType));
System.out.println("===>>> Thread local component " + classType.getName() + " registered.");
}
else
{
container.registerComponentImplementation(classType);
}
}
else
{
try
{
Class keyType = loader.loadClass(key);
if (component.isMultiInstance())
{
container.registerComponent(new ConstructorInjectionComponentAdapter(keyType, classType));
System.out.println("===>>> Thread local component " + classType.getName() + " registered.");
}
else
{
container.registerComponentImplementation(keyType, classType);