/** * Initialize the classloader system * * @param clazz the original clazz * @param system the system * @param policy the policy * @return the clazz loaded from the new classloading system */ public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderSystem system, ClassLoaderPolicy policy) { return initializeClassLoader(clazz, system, policy, getParentPackages()); }
/** * Initialize the classloader system * * @param clazz the original clazz * @param system the system * @param policy the policy * @return the clazz loaded from the new classloading system */ public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderSystem system, ClassLoaderPolicy policy) { 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()); }
/** * 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 system the system * @param parentFilter the parent filter * @param policy the policy * @return the clazz loaded from the new classloading system */ public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderSystem system, ClassFilter parentFilter, ClassLoaderPolicy policy) { Set<String> parentPackages = getParentPackages(); String[] parentPkgs = parentPackages.toArray(new String[parentPackages.size()]); PackageClassFilter filter = new PackageClassFilter(parentPkgs); filter.setIncludeJava(true); CombiningClassFilter beforeFilter = CombiningClassFilter.create(filter, parentFilter); ParentPolicy parentPolicy = new ParentPolicy(beforeFilter, ClassFilterUtils.NOTHING); return initializeClassLoader(clazz, system, parentPolicy, policy); }
/** * Initialize the classloader system * * @param clazz the original clazz * @param system the system * @param parentFilter the parent filter * @param policy the policy * @return the clazz loaded from the new classloading system */ public Class<?> initializeClassLoader(Class<?> clazz, ClassLoaderSystem system, ClassFilter parentFilter, ClassLoaderPolicy policy) { Set<String> parentPackages = getParentPackages(); String[] parentPkgs = parentPackages.toArray(new String[parentPackages.size()]); PackageClassFilter filter = new PackageClassFilter(parentPkgs); filter.setIncludeJava(true); CombiningClassFilter beforeFilter = CombiningClassFilter.create(filter, parentFilter); ParentPolicy parentPolicy = new ParentPolicy(beforeFilter, ClassFilter.NOTHING); return initializeClassLoader(clazz, system, parentPolicy, policy); }