/** * Create a mock classloading system<p> * * No security problem. A user can create their own classloader system, so what? * * @return the new classloading system */ public static ClassLoaderSystem createMockClassLoaderSystem() { return new DefaultClassLoaderSystem(); }
/** * Create a ClassLoaderSystem with the default ClassLoaderDomain set to use * a AFTER ParentPolicy. * * @return ClassLoaderSystem instance */ public static ClassLoaderSystem getClassLoaderSystem() { DefaultClassLoaderSystem system = new DefaultClassLoaderSystem(); ClassLoaderDomain defaultDomain = system.getDefaultDomain(); defaultDomain.setParentPolicy(ParentPolicy.AFTER); return system; }
/** * Create a mock classloading system<p> * * No security problem. A user can create their own classloader system, so what? * * @return the new classloading system */ public static ClassLoaderSystem createMockClassLoaderSystem() { return new DefaultClassLoaderSystem(); }
/** * Initialize the classloader system * * @param clazz the original clazz * @param parentFilter the parent filter * @param policy the policy * @return the clazz loaded from the new classloading system */ public Class<?> initializeClassLoader(Class<?> clazz, ClassFilter parentFilter, ClassLoaderPolicy policy) { ClassLoaderSystem system = new DefaultClassLoaderSystem(); return initializeClassLoader(clazz, system, parentFilter, policy); }
/** * Initialize the classloader system * * @param clazz the original clazz * @param parentFilter the parent filter * @param policy the policy * @return the clazz loaded from the new classloading system */ public Class<?> initializeClassLoader(Class<?> clazz, ClassFilter parentFilter, ClassLoaderPolicy policy) { ClassLoaderSystem system = new DefaultClassLoaderSystem(); return initializeClassLoader(clazz, system, parentFilter, policy); }
/** * Initialize the classloader system * * @param clazz the original clazz * @param policy the policy * @return the clazz loaded from the new classloading system */ public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderPolicy policy) { ClassLoaderSystem system = new DefaultClassLoaderSystem(); return initializeClassLoader(clazz, system, policy, getParentPackages()); }
/** * Initialize the classloader system * * @param clazz the original clazz * @param policy the policy * @return the clazz loaded from the new classloading system */ public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderPolicy policy) { ClassLoaderSystem system = new DefaultClassLoaderSystem(); return initializeClassLoader(clazz, system, policy, getParentPackages()); }