Package org.glassfish.jersey.server.model

Examples of org.glassfish.jersey.server.model.Parameter$ParamAnnotationHelper


        final Class<?> targetType = ReflectionHelper.erasure(targetGenericType);

        Set<ValueFactoryProvider> providers = Sets.filter(Providers.getProviders(locator, ValueFactoryProvider.class),
                concreteValueFactoryClassFilter);
        final ValueFactoryProvider valueFactoryProvider = providers.iterator().next(); // get first provider in the set
        final Parameter parameter = Parameter.create(
                componentClass,
                componentClass,
                hasEncodedAnnotation(injectee),
                targetType,
                targetGenericType,
View Full Code Here


        }

        if (!entityParamFound && Collections.frequency(providers, null) == 1) {
            // Try to find entity if there is one unresolved parameter and the annotations are unknown
            final int entityParamIndex = providers.lastIndexOf(null);
            final Parameter parameter = parameterized.getParameters().get(entityParamIndex);
            if (Parameter.Source.UNKNOWN == parameter.getSource() && !parameter.isQualified()) {
                providers.set(entityParamIndex, getValueFactory(
                        valueFactoryProviders,
                        Parameter.overrideSource(parameter, Parameter.Source.ENTITY)));
            }
        }
View Full Code Here

    }

    private boolean isReadable(final RequestSpecificConsumesProducesAcceptor candidate) {
        final Invocable invocable = candidate.methodAcceptorPair.model.getInvocable();
        final Method handlingMethod = invocable.getHandlingMethod();
        final Parameter entityParam = getEntityParam(invocable);

        if (entityParam == null) {
            return true;
        } else {
            final Class<?> entityType = entityParam.getRawType();

            for (final MessageBodyReader reader : workers.getMessageBodyReadersForType(entityType)) {
                if (reader.isReadable(entityType, entityParam.getType(),
                        handlingMethod.getDeclaredAnnotations
                                (), candidate.consumes.getCombinedMediaType())) {
                    return true;
                }
            }
View Full Code Here

         */
        @javax.enterprise.inject.Produces
        @JaxRsParamQualifier
        public String getParameterValue(final InjectionPoint injectionPoint, final BeanManager beanManager) {

            final Parameter parameter = parameterCache.compute(injectionPoint);

            if (parameter != null) {

                final ServiceLocator locator = beanManager.getExtension(CdiComponentProvider.class).locator;

View Full Code Here

        final Class<?> targetType = ReflectionHelper.erasure(targetGenericType);

        Set<ValueFactoryProvider> providers = Sets.filter(Providers.getProviders(locator, ValueFactoryProvider.class),
                concreteValueFactoryClassFilter);
        final ValueFactoryProvider valueFactoryProvider = providers.iterator().next(); // get first provider in the set
        final Parameter parameter = Parameter.create(
                componentClass,
                componentClass,
                hasEncodedAnnotation(injectee),
                targetType,
                targetGenericType,
View Full Code Here

    }

    private boolean isReadable(final RequestSpecificConsumesProducesAcceptor candidate) {
        final Invocable invocable = candidate.methodAcceptorPair.model.getInvocable();
        final Method handlingMethod = invocable.getHandlingMethod();
        final Parameter entityParam = getEntityParam(invocable);

        if (entityParam == null) {
            return true;
        } else {
            final Class<?> entityType = entityParam.getRawType();

            for (final MessageBodyReader<?> reader : workers.getMessageBodyReadersForType(entityType)) {
                if (reader.isReadable(entityType, entityParam.getType(),
                        handlingMethod.getDeclaredAnnotations
                                (), candidate.consumes.getCombinedMediaType())) {
                    return true;
                }
            }
View Full Code Here

        final Class<?> targetType = ReflectionHelper.erasure(targetGenericType);

        Set<ValueFactoryProvider> providers = Sets.filter(Providers.getProviders(locator, ValueFactoryProvider.class),
                concreteValueFactoryClassFilter);
        final ValueFactoryProvider valueFactoryProvider = providers.iterator().next(); // get first provider in the set
        final Parameter parameter = Parameter.create(
                componentClass,
                componentClass,
                hasEncodedAnnotation(injectee),
                targetType,
                targetGenericType,
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.server.model.Parameter$ParamAnnotationHelper

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.