Examples of OnEvent


Examples of com.carmanconsulting.hibiscus.event.annotation.OnEvent

    public static void registerAnnotatedListeners(EventListenerRegistry registry, Object targetObject)
    {
        for (Method targetMethod : targetObject.getClass().getDeclaredMethods())
        {
            OnEvent onEvent = targetMethod.getAnnotation(OnEvent.class);
            if (onEvent != null)
            {
                registerEventListener(registry, onEvent.value(), targetObject, targetMethod);
            }
        }
    }
View Full Code Here

Examples of com.carmanconsulting.hibiscus.event.annotation.OnEvent

    public static void registerAnnotatedListeners(EventListenerRegistry registry, Object targetObject)
    {
        for (Method targetMethod : targetObject.getClass().getDeclaredMethods())
        {
            OnEvent onEvent = targetMethod.getAnnotation(OnEvent.class);
            if (onEvent != null)
            {
                registerEventListener(registry, onEvent.value(), targetObject, targetMethod);
            }
        }
    }
View Full Code Here

Examples of com.jpeterson.x10.event.OnEvent

        final char houseCodeChar = houseCode.charAt(0);
        final int deviceCodeInt = Integer.valueOf(deviceCode).intValue();

        X10Event[] events = new X10Event[ 2 ];
        events[ 0 ] = new AddressEvent(this, houseCodeChar, deviceCodeInt);
        events[ 1 ] = new OnEvent(this, houseCodeChar);

        send(events);
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

        replay();

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

        OnEvent annotation = ct.getMethodAnnotation(new MethodSignature("handler"), OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), "fred");
        assertEquals(annotation.component(), "alpha");

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

        replay();

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

        OnEvent annotation = ct.getMethodAnnotation(
                new TransformMethodSignature("handler"),
                OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), "fred");
        assertEquals(annotation.component(), "alpha");

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

            builder.begin();

            closeCount++;
        }

        OnEvent annotation = transformation.getMethodAnnotation(method, OnEvent.class);

        String eventType = extractEventType(method, annotation);

        if (InternalUtils.isNonBlank(eventType))
        {
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

        replay();

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

        OnEvent annotation = ct.getMethodAnnotation(new TransformMethodSignature("handler"), OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), "fred");
        assertEquals(annotation.component(), "alpha");

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

        replay();

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

        OnEvent annotation = ct.getMethodAnnotation(new MethodSignature("handler"), OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), new String[]
        { "fred", "barney" });
        assertEquals(annotation.component(), new String[]
        { "alpha", "beta" });

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    {
        // $1 is the event

        int closeCount = 0;

        OnEvent annotation = transformation.getMethodAnnotation(method, OnEvent.class);

        String[] eventTypes = extractEventTypes(method, annotation);

        if (eventTypes.length > 0)
        {
View Full Code Here

Examples of org.apache.tapestry.annotations.OnEvent

    @Test
    public void minimal_case()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        MethodSignature signature = new MethodSignature("foo");

        train_findMethods(ct, signature);
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.