package io.craft.armor;

import java.lang.reflect.Proxy;

import io.craft.armor.spi.ArmorProxyFactory;

import org.springframework.stereotype.Component;

/**
 * @author mindwind
 * @version 1.0, Dec 18, 2014
 */
@Component("craft.armor.proxy.factory")
public class DefaultArmorProxyFactory implements ArmorProxyFactory {

	@Override
	public Object getProxy(Object bean, Class<?>[] interfaces) {
		return Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), interfaces, new ArmorInvocationHandler(bean));
	}

}

@@ -22,41 +22,8 @@
 r;%0A%0A
-import java.lang.reflect.Proxy;%0A%0A
 impo
@@ -75,48 +75,31 @@
 ort 
-org.springframework.stereotype.Component
+java.lang.reflect.Proxy
 ;%0A%0A/
@@ -159,48 +159,8 @@
  */%0A
-@Component(%22craft.armor.proxy.factory%22)%0A
 publ

improve - remove Component annotation