Package org.jboss.forge.classloader.mock.system

Examples of org.jboss.forge.classloader.mock.system.ArrayListFactory


      Object foreignInstance = foreignType.newInstance();
      List<?> proxy = (List<?>) foreignType.getMethod("getArrayList").invoke(foreignInstance);
      Assert.assertFalse(Proxies.isForgeProxy(proxy));

      Object delegate = foreignType.newInstance();
      ArrayListFactory enhancedFactory = (ArrayListFactory) ClassLoaderAdapterBuilder.callingLoader(thisLoader)
               .delegateLoader(dep1Loader).enhance(delegate);

      Assert.assertTrue(Proxies.isForgeProxy(enhancedFactory));

      @SuppressWarnings("rawtypes")
      List enhancedInstance = enhancedFactory.getArrayList();
      enhancedInstance.add(new ArrayListFactory());
      enhancedInstance.get(0);
      Assert.assertTrue(Proxies.isForgeProxy(enhancedInstance));

   }
View Full Code Here

TOP

Related Classes of org.jboss.forge.classloader.mock.system.ArrayListFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.