Package org.apache.wink.common.annotations

Examples of org.apache.wink.common.annotations.Scope


            return null;
        }

        @SuppressWarnings("unchecked")
        final Class<T> cls = (Class<T>)object.getClass();
        Scope scope = cls.getAnnotation(Scope.class);

        if (scope != null) {
            if (scope.value() == ScopeType.SINGLETON) {
                return LifecycleManagerUtils.createSingletonObjectFactory(object);
            } else if (scope.value() == ScopeType.PROTOTYPE) {
                // It's a prototype
                return LifecycleManagerUtils.createPrototypeObjectFactory(cls);
            }
        }
        // has no Scope annotation, do nothing
View Full Code Here


        if (cls == null) {
            return null;
        }

        Scope scope = cls.getAnnotation(Scope.class);
        if (scope != null) {
            if (scope.value() == ScopeType.SINGLETON) {
                return LifecycleManagerUtils.createSingletonObjectFactory(cls);
            } else if (scope.value() == ScopeType.PROTOTYPE) {
                return LifecycleManagerUtils.createPrototypeObjectFactory(cls);
            }
        }
        // has no Scope annotation, do nothing
        return null;
View Full Code Here

TOP

Related Classes of org.apache.wink.common.annotations.Scope

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.