Package org.apache.tapestry.annotations

Examples of org.apache.tapestry.annotations.Service


    public void annotation_present()
    {
        Class objectType = Runnable.class;
        AnnotationProvider provider = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();
        Service service = newMock(Service.class);
        String serviceId = "JiffyPop";
        Runnable instance = mockRunnable();

        train_getAnnotation(provider, Service.class, service);

        expect(service.value()).andReturn(serviceId);

        train_getService(locator, serviceId, objectType, instance);

        replay();
View Full Code Here


public class ServiceAnnotationObjectProvider implements ObjectProvider
{
    public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider,
                         ObjectLocator locator)
    {
        Service annotation = annotationProvider.getAnnotation(Service.class);

        if (annotation == null) return null;

        return locator.getService(annotation.value(), objectType);
    }
View Full Code Here

public class ServiceAnnotationObjectProvider implements ObjectProvider
{
    public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider,
            ObjectLocator locator)
    {
        Service annotation = annotationProvider.getAnnotation(Service.class);

        if (annotation == null) return null;

        return locator.getService(annotation.value(), objectType);
    }
View Full Code Here

public class ServiceAnnotationObjectProvider implements ObjectProvider
{
    public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider,
                         ObjectLocator locator)
    {
        Service annotation = annotationProvider.getAnnotation(Service.class);

        if (annotation == null) return null;

        return locator.getService(annotation.value(), objectType);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.annotations.Service

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.