Examples of loadClass()


Examples of org.apache.xalan.xsltc.runtime.TransletLoader.loadClass()

  if (methodName.indexOf('-') > 0)
    methodName = replaceDash(methodName);

  try {
      TransletLoader loader = new TransletLoader();
      final Class clazz = loader.loadClass(className);

      if (clazz == null) {
        return false;
      }
      else {
View Full Code Here

Examples of org.apache.xbean.classloader.JarFileClassLoader.loadClass()

    }

    public void testParentFirstClassLoader() throws Exception {
        URLClassLoader pcl = (URLClassLoader) getClass().getClassLoader();
        ClassLoader clsLoader = new JarFileClassLoader("", pcl.getURLs(), pcl, false, new String[0], new String[0]);
        Class clazz = clsLoader.loadClass(TestClass.class.getName());
        assertSame(TestClass.class, clazz);
    }

    public void testSelfFirstClassLoader() throws Exception {
        URLClassLoader pcl = (URLClassLoader) getClass().getClassLoader();
View Full Code Here

Examples of org.apache.xbean.osgi.bundle.util.BundleClassLoader.loadClass()

                for (Class<? extends Application> clazz : applicationClasses) {
                    if (clazz.getName().equalsIgnoreCase(parm.getParamValue().trim())) {
                        applicationClass = clazz;
                        Class<?> servletClass = null;
                        try {
                            servletClass = bundleClassLoader.loadClass(servlet.getServletClass());
                        } catch (ClassNotFoundException e) {
                            log.warn("failed to load servlet class:" + servlet.getServletClass());
                        }
                        if ((servletClass == null) || !servletClass.isAssignableFrom(HttpServlet.class)) {
                            servlet.setServletClass(REST_SERVLET_NAME);
View Full Code Here

Examples of org.codehaus.aspectwerkz.compiler.VerifierClassLoader.loadClass()

        try {
            VerifierClassLoader cl = new VerifierClassLoader(
                    new URL[]{new URL(targetPath)},
                    ClassLoader.getSystemClassLoader());

            Class target = cl.loadClass("test.xmldef.clapp.Target");
            assertEquals(target.getClassLoader().hashCode(), cl.hashCode());
            Method m = target.getMethod("callme", new Class[]{});
            String res = (String) m.invoke(target.newInstance(), new Object[]{});
            assertEquals("before call after", res);
        } catch (Throwable t) {
View Full Code Here

Examples of org.codehaus.classworlds.ClassRealm.loadClass()

  public void performLaunch() throws LauncherException {
    Throwable throwable = null;
    try {
      ClassRealm mainRealm = getMainRealm();

      Class clazz = mainRealm.loadClass(mainClassName);

      Class classworldClass = mainRealm.loadClass(CLASSWORLD_CLASS_NAME);

      Method method = ReflectionUtil.getMainMethodWithTwoParameters(clazz, classworldClass);
View Full Code Here

Examples of org.codehaus.loom.classman.runtime.JoinClassLoader.loadClass()

        final ClassLoader[] cls = new ClassLoader[]{cl1, cl2};
        final JoinClassLoader join =
            new JoinClassLoader( cls, ClassLoader.getSystemClassLoader() );
        try
        {
            join.loadClass( DataConstants.DATA1_CLASS );
        }
        catch( ClassNotFoundException e )
        {
            fail( "Unable to load Data1 from cl1 classloader" );
        }
View Full Code Here

Examples of org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass()

    }
   
    private Class<?> getMojoClass(MojoDescriptor md, PluginDescriptor pd) throws ClassNotFoundException {
        try {
            ClassRealm classRealm = pd.getClassRealm();
            return classRealm == null ? null : classRealm.loadClass( md.getImplementation() );
        } catch (NoSuchMethodError e) {
            // maybe we are in maven2 build ClassRealm package has changed
            return getMojoClassForMaven2( md, pd );
        }
    }
View Full Code Here

Examples of org.deuce.transform.asm.loader.CustomClassLoader.loadClass()

  }

  public static Class getClass(String className) {
    CustomClassLoader cl = HyFlow.getClassLoader();
    try {
      return cl.loadClass(className);
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
    return null;
  }
View Full Code Here

Examples of org.dozer.util.DozerClassLoader.loadClass()

      Method method;
      if (createMethod.contains(".")) {
        String methodName = createMethod.substring(createMethod.lastIndexOf(".") + 1, createMethod.length());
        String typeName = createMethod.substring(0, createMethod.lastIndexOf("."));
        DozerClassLoader loader = BeanContainer.getInstance().getClassLoader();
        Class type = loader.loadClass(typeName);
        method = findMethod(type, methodName);
      } else {
        method = findMethod(actualClass, createMethod);
      }
      return ReflectionUtils.invoke(method, null, null);
View Full Code Here

Examples of org.drools.core.rule.JavaDialectRuntimeData.PackageClassLoader.loadClass()

       
        ClassFieldAccessorStore store = new ClassFieldAccessorStore();
        store.setClassFieldAccessorCache( new ClassFieldAccessorCache( classLoader ) );
        store.setEagerWire( true );
       
        Class clazz = classLoader.loadClass( classDef.getClassName() );
        classDef.setDefinedClass( clazz );
       
        return clazz;
       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.