Package com.facebook.presto.byteCode

Examples of com.facebook.presto.byteCode.DynamicClassLoader.defineClass()


        DynamicClassLoader classLoader = new DynamicClassLoader();
        ClassWriter cw = new SmartClassWriter(ClassInfoLoader.createClassInfoLoader(ImmutableList.of(classDefinition), classLoader));
        classDefinition.visit(cw);

        Class<?> clazz = classLoader.defineClass(classDefinition.getType().getJavaClassName(), cw.toByteArray());
        return clazz.getMethod("test").invoke(null);
    }
}
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.