Package com.sun.jersey.spi.inject

Examples of com.sun.jersey.spi.inject.Injectable


            int ps = con.getParameterTypes().length;
            for (int p = 0; p < ps; p++) {
                Type pgtype = con.getGenericParameterTypes()[p];
                Annotation[] as = con.getParameterAnnotations()[p];
                aoc.setAnnotations(as);
                Injectable i = null;
                for (Annotation a : as) {
                    i = ipc.getInjectable(
                            a.annotationType(), aoc, a, pgtype,
                            ComponentScope.UNDEFINED_SINGLETON);
                }
View Full Code Here


        ComponentContext ic = new AnnotatedContext(p.getAnnotations());

        if (s == ComponentScope.PerRequest) {
            // Find a per request injectable with Parameter
            Injectable i = getInjectable(
                    p.getAnnotation().annotationType(),
                    ic,
                    p.getAnnotation(),
                    p,
                    ComponentScope.PerRequest);
View Full Code Here

                Type type = pType.getActualTypeArguments()[0];
                // TODO check if concrete type
               
                final ContextResolver cr = getResolver(ic, type);
                if (cr == null) {
                    return new Injectable() {
                        public Object getValue() {
                            return null;
                        }                   
                    };
                } else {
                    return new Injectable() {
                        public Object getValue() {
                            return cr;
                        }
                    };
                }
View Full Code Here

            ComponentContext ic,
            A a,
            C c,
            ComponentScope s) {
        for (MetaInjectableProvider mip : findInjectableProviders(ac, c.getClass(), s)) {
            Injectable i = mip.ip.getInjectable(ic, a, c);
            if (i != null)
                return i;
        }
        return null;
    }
View Full Code Here

            ComponentContext ic,
            A a,
            C c,
            List<ComponentScope> ls) {
        for (ComponentScope s : ls) {
            Injectable i = getInjectable(ac, ic, a, c, s);
            if (i != null)
                return i;
            else {
            }
        }
View Full Code Here

            ComponentContext ic,
            A a,
            C c,
            List<ComponentScope> ls) {
        for (ComponentScope s : ls) {
            Injectable i = getInjectable(ac, ic, a, c, s);
            if (i != null)
                return new InjectableScopePair(i, s);
        }
        return null;
    }
View Full Code Here

            }
           
            public Injectable getInjectable(ComponentContext ic, Context a, Type c) {
                final Object o = m.get(c);
                if (o != null) {
                    return new Injectable() {
                        public Object getValue() {
                            return o;
                        }
                    };
                } else
View Full Code Here

TOP

Related Classes of com.sun.jersey.spi.inject.Injectable

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.