List of usage examples for java.security SecureClassLoader SecureClassLoader
protected SecureClassLoader()
From source file:net.nicholaswilliams.java.licensing.encryption.TestRSAKeyPairGenerator.java
@Override public ClassLoader getClassLoader(Location location) { return new SecureClassLoader() { @Override/*from ww w . j ava 2s. co m*/ protected Class<?> findClass(String name) throws ClassNotFoundException { byte[] b = MockClassFileManager.this.javaClassObject.getBytes(); return super.defineClass(name, MockClassFileManager.this.javaClassObject.getBytes(), 0, b.length); } }; }