Examples of toClass()


Examples of javassist.CtClass.toClass()

    //
      generateProxy(proxyClass, additionalCode);
     
    //  Generate class
    //
      return proxyClass.toClass(superClass.getClassLoader(), superClass.getProtectionDomain());
    }
    catch(Exception ex)
    {
      throw new ProxyException("Proxy generation failure for " + superClass.getName(), ex);
    }
View Full Code Here

Examples of javassist.CtClass.toClass()

                    generatedMethod.append("}");

                    CtMethod m = CtNewMethod.make(generatedMethod.toString(), cc);
                    cc.addMethod(m);

                    result = (Function)cc.toClass().newInstance();

                    hGeneratedBeanFunctions.put(key, result);
                   
                    logger.info("Generated bytecode for {}.{} as '{}'.",
                                new Object[] { className,
View Full Code Here

Examples of javassist.CtClass.toClass()

                    }
                    ctClass.addMethod(CtNewMethod.abstractMethod(
                            pool.getCtClass(method.getReturnType().getCanonicalName()),
                            method.getName(), parameters, exceptions, ctClass));
                }
                return ctClass.toClass();
            }
        } catch (CannotCompileException e) {
            throw new IllegalStateException(e.getMessage(), e);
        } catch (NotFoundException e) {
            throw new IllegalStateException(e.getMessage(), e);
View Full Code Here

Examples of javassist.CtClass.toClass()

                    }
                    ctClass.addMethod(CtNewMethod.abstractMethod(
                            getCtClass(pool, method.getReturnType().getCanonicalName()),
                            method.getName(), parameters, exceptions, ctClass));
                }
                return ctClass.toClass();
            }
        } catch (CannotCompileException e) {
            throw new IllegalStateException(e.getMessage(), e);
        } catch (NotFoundException e) {
            throw new IllegalStateException(e.getMessage(), e);
View Full Code Here

Examples of javassist.CtClass.toClass()

        } catch (NotFoundException | CannotCompileException e) {
            throw Throwables.propagate(e);
        }

        try {
            return (CopyExtractor<E>) cc.toClass().newInstance();
        } catch (InstantiationException | IllegalAccessException | CannotCompileException e) {
            throw Throwables.propagate(e);
        }
    }
View Full Code Here

Examples of javassist.CtClass.toClass()

        long javassistSerialVerUid = JavassistHelper.calculateSerialVerUid(javassistClass);



        Class javaClassGenerated = javassistClass.toClass();

        long javaSerialVerUid = ObjectStreamClass.lookup(javaClassGenerated).getSerialVersionUID();


View Full Code Here

Examples of javassist.CtClass.toClass()

        ctor.setBody("{super();}");
        javassistClass.addConstructor(ctor);

        long javassistSerialVerUid = JavassistHelper.calculateSerialVerUid(javassistClass);

        Class javaClassGenerated = javassistClass.toClass();
        long javaSerialVerUid = ObjectStreamClass.lookup(javaClassGenerated).getSerialVersionUID();

        assertEquals(javaSerialVerUid, javassistSerialVerUid);

    }
View Full Code Here

Examples of org.apache.tapestry.services.ClassTransformation.toClass()

        replay();

        ClassTransformation ct = createClassTransformation(AnnotatedPage.class, log);

        assertSame(ct.toClass("float"), Float.class);

        verify();
    }

    @Test
View Full Code Here

Examples of org.apache.tapestry.services.ClassTransformation.toClass()

        replay();

        ClassTransformation ct = createClassTransformation(AnnotatedPage.class, log);

        assertSame(ct.toClass("java.util.Map"), Map.class);

        verify();
    }

    @Test
View Full Code Here

Examples of org.apache.tapestry.services.ClassTransformation.toClass()

        replay();

        ClassTransformation ct = createClassTransformation(AnnotatedPage.class, logger);

        assertSame(ct.toClass("float"), Float.class);

        verify();
    }

    @Test
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.