Package org.hotswap.agent.testData

Examples of org.hotswap.agent.testData.SimplePlugin


        final AnnotationProcessor annotationProcessor = new AnnotationProcessor(pluginManager);

        annotationProcessor.addAnnotationHandler(Init.class, initHandler);
        annotationProcessor.addAnnotationHandler(OnClassLoadEvent.class, onClassLoadedHandler);

        annotationProcessor.processAnnotations(new SimplePlugin());

        context.assertIsSatisfied();
    }
View Full Code Here


*/
public class PluginManagerInvokerTest {

    @Test
    public void testBuildCallPluginMethod() throws Exception {
        SimplePlugin plugin = new SimplePlugin();
        registerPlugin(plugin);
//        plugin.init(PluginManager.getInstance());

        String s = PluginManagerInvoker.buildCallPluginMethod(plugin.getClass(),
                "callPluginMethod",
                "Boolean.TRUE", "java.lang.Boolean");

        ClassPool classPool = ClassPool.getDefault();
        classPool.appendSystemPath();
View Full Code Here

                    with("org.hotswap.example.type"), with(any(ClassFileTransformer.class)));
        }});

        OnClassLoadedHandler onClassLoadedHandler = new OnClassLoadedHandler(pluginManager);

        SimplePlugin simplePlugin = new SimplePlugin();
        Method method = SimplePlugin.class.getMethod("transform");
        PluginAnnotation<OnClassLoadEvent> pluginAnnotation = new PluginAnnotation<OnClassLoadEvent>(SimplePlugin.class,
                simplePlugin, method.getAnnotation(OnClassLoadEvent.class), method);
        assertTrue("Init successful",
                onClassLoadedHandler.initMethod(pluginAnnotation));
View Full Code Here

public class InitHandlerTest {

    @Test
    public void testInitMethod() throws Exception {
        PluginManager pluginManager = PluginManager.getInstance();
        SimplePlugin simplePlugin = new SimplePlugin();

        // register the plugin
        pluginManager.getPluginRegistry().getRegisteredPlugins().put(SimplePlugin.class,
                Collections.<ClassLoader, Object>singletonMap(getClass().getClassLoader(), simplePlugin));
View Full Code Here

TOP

Related Classes of org.hotswap.agent.testData.SimplePlugin

Copyright © 2018 www.massapicom. 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.