Examples of InjectService


Examples of org.apache.tapestry5.ioc.annotations.InjectService

    @SuppressWarnings("unchecked")
    public void transform(ClassTransformation transformation, MutableComponentModel model)
    {
        for (TransformField field : transformation.matchFieldsWithAnnotation(InjectService.class))
        {
            InjectService annotation = field.getAnnotation(InjectService.class);

            field.claim(annotation);

            Class fieldType = cache.forName(field.getType());

            Object service = locator.getService(annotation.value(), fieldType);

            field.inject(service);
        }
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.InjectService

        };

        // At some point, it would be nice to eliminate InjectService, and rely
        // entirely on service interface type and point-of-injection markers.

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, injectionType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.InjectService

                {
                    public void run()
                    {
                        final Class<?> fieldType = f.getType();

                        InjectService is = ap.getAnnotation(InjectService.class);
                        if (is != null)
                        {
                            inject(object, f, locator.getService(is.value(), fieldType));
                            return;
                        }

                        if (ap.getAnnotation(Inject.class) != null)
                        {
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.InjectService

        if (names.isEmpty()) return;

        for (String name : names)
        {
            InjectService annotation = transformation.getFieldAnnotation(name, InjectService.class);

            String typeName = transformation.getFieldType(name);

            Class fieldType = cache.forName(typeName);

            Object service = locator.getService(annotation.value(), fieldType);

            transformation.injectField(name, service);

            transformation.claimField(name, annotation);
        }
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.InjectService

        };

        // At some point, it would be nice to eliminate InjectService, and rely
        // entirely on service interface type and point-of-injection markers.

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, injectionType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.InjectService

                {
                    public void run()
                    {
                        final Class<?> fieldType = f.getType();

                        InjectService is = ap.getAnnotation(InjectService.class);
                        if (is != null)
                        {
                            inject(object, f, locator.getService(is.value(), fieldType));
                            return;
                        }

                        if (ap.getAnnotation(Inject.class) != null)
                        {
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.InjectService

        };

        // At some point, it would be nice to eliminate InjectService, and rely
        // entirely on service interface type and point-of-injection markers.

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, parameterType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.InjectService

        };

        // At some point, it would be nice to eliminate InjectService, and rely
        // entirely on service interface type and point-of-injection markers.

        InjectService is = provider.getAnnotation(InjectService.class);

        if (is != null)
        {
            String serviceId = is.value();

            return locator.getService(serviceId, injectionType);
        }

        // In the absence of @InjectService, try some autowiring. First, does the
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.InjectService

                tracker.run(description, new Runnable()
                {
                    public void run()
                    {
                        InjectService is = ap.getAnnotation(InjectService.class);

                        if (is != null)
                        {
                            inject(object, f, locator.getService(is.value(), f.getType()));
                            return;
                        }

                        if (ap.getAnnotation(Inject.class) != null)
                        {
View Full Code Here

Examples of org.hibernate.service.spi.InjectService

  }

  private <R extends Service> void applyInjections(R service) {
    try {
      for ( Method method : service.getClass().getMethods() ) {
        InjectService injectService = method.getAnnotation( InjectService.class );
        if ( injectService == null ) {
          continue;
        }

        processInjection( service, method, injectService );
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.