Package net.sf.robocode.host.security

Examples of net.sf.robocode.host.security.RobotClassLoader


/**
* @author Pavel Savara (original)
*/
public class JavaHost implements IHost {
  public IRobotClassLoader createLoader(IRobotItem robotItem) {
    return new RobotClassLoader(robotItem.getClassPathURL(), robotItem.getFullClassName());
  }
View Full Code Here


    Assert.assertEquals(engineLoader, c.getClassLoader());
  }

  @Test
  public void robotAllowed() throws ClassNotFoundException {
    RobotClassLoader cl = new RobotClassLoader(classPath, goodRobot);
    final Class<?> c = cl.loadClass("robocode.Robot", true);

    Assert.assertEquals(Container.systemLoader, c.getClassLoader());
  }
View Full Code Here

    Assert.assertEquals(Container.systemLoader, c.getClassLoader());
  }

  @Test
  public void robotAllowedMain() throws ClassNotFoundException {
    RobotClassLoader cl = new RobotClassLoader(classPath, goodRobot);
    final Class<?> c = cl.loadRobotMainClass(true);

    Assert.assertEquals(cl, c.getClassLoader());
  }
View Full Code Here

    Assert.assertEquals(cl, c.getClassLoader());
  }

  @Test(expected = ClassNotFoundException.class)
  public void robotBlockedBad() throws ClassNotFoundException {
    RobotClassLoader cl = new RobotClassLoader(classPath, badRobot);

    cl.loadRobotMainClass(true);
  }
View Full Code Here

    cl.loadRobotMainClass(true);
  }

  @Test(expected = ClassNotFoundException.class)
  public void robotBlockedRobocode() throws ClassNotFoundException {
    RobotClassLoader cl = new RobotClassLoader(classPath, goodRobot);

    cl.loadClass("net.sf.robocode.host.proxies.BasicRobotProxy");
  }
View Full Code Here

    cl.loadClass("net.sf.robocode.host.proxies.BasicRobotProxy");
  }

  @Test(expected = ClassNotFoundException.class)
  public void robotBlockedControl() throws ClassNotFoundException {
    RobotClassLoader cl = new RobotClassLoader(classPath, goodRobot);

    cl.loadClass("robocode.control.RobocodeEngine");
  }
View Full Code Here

TOP

Related Classes of net.sf.robocode.host.security.RobotClassLoader

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.