Package org.glassfish.jersey.internal.util.collection

Examples of org.glassfish.jersey.internal.util.collection.ClassTypePair.type()


        return null;
    }

    private Parameter unpack(Parameter parameter) {
        ClassTypePair typePair = ReflectionHelper.getTypeArgumentAndClass(parameter.getType()).get(0);
        return Parameter.create(null, null, parameter.isEncoded(), typePair.rawClass(), typePair.type(), parameter.getAnnotations());
    }
}
View Full Code Here


        return null;
    }

    private Parameter unpack(Parameter parameter) {
        ClassTypePair typePair = ReflectionHelper.getTypeArgumentAndClass(parameter.getType()).get(0);
        return Parameter.create(null, null, parameter.isEncoded(), typePair.rawClass(), typePair.type(), parameter.getAnnotations());
    }
}
View Full Code Here

            };
        }
        final Set<ParamConverterProvider> converterProviders = Providers.getProviders(locator, ParamConverterProvider.class);
        for (ParamConverterProvider provider : converterProviders) {
            @SuppressWarnings("unchecked")
            final ParamConverter<?> converter = provider.getConverter(ctp.rawClass(), ctp.type(), annotations);
            if (converter != null) {
                return new ParamConverter<T>() {
                    @Override
                    public T fromString(final String value) {
                        return rawType.cast(Optional.fromNullable(value)
View Full Code Here

            final Type[] ptts = pt.getActualTypeArguments();
            boolean modified = false;
            for (int i = 0; i < ptts.length; i++) {
                ClassTypePair ct =
                        resolveGenericType(concreteClass, declaringClass, (Class) pt.getRawType(), ptts[i]);
                if (ct.type() != ptts[i]) {
                    ptts[i] = ct.type();
                    modified = true;
                }
            }
            if (modified) {
View Full Code Here

            boolean modified = false;
            for (int i = 0; i < ptts.length; i++) {
                ClassTypePair ct =
                        resolveGenericType(concreteClass, declaringClass, (Class) pt.getRawType(), ptts[i]);
                if (ct.type() != ptts[i]) {
                    ptts[i] = ct.type();
                    modified = true;
                }
            }
            if (modified) {
                ParameterizedType rpt = new ParameterizedType() {
View Full Code Here

            }
        } else if (genericResolvedType instanceof GenericArrayType) {
            GenericArrayType gat = (GenericArrayType) genericResolvedType;
            final ClassTypePair ct =
                    resolveGenericType(concreteClass, declaringClass, null, gat.getGenericComponentType());
            if (gat.getGenericComponentType() != ct.type()) {
                try {
                    Class ac = ReflectionHelper.getArrayForComponentType(ct.rawClass());
                    return ClassTypePair.of(ac);
                } catch (Exception e) {
                    LOGGER.log(Level.FINEST, "", e);
View Full Code Here

                    ClassTypePair ctp = resolveTypeVariable(p.concreteClass, p.declaringClass, (TypeVariable) a);
                    if (ctp == null) {
                        throw new IllegalArgumentException(
                                LocalizationMessages.ERROR_RESOLVING_GENERIC_TYPE_VALUE(p.genericInterface, p.concreteClass));
                    }
                    ras[i] = ctp.type();
                }
            }
            return ras;
        } else {
            return null;
View Full Code Here

                handlerClass,
                this.handlingMethod.getDeclaringClass(),
                this.handlingMethod.getReturnType(),
                this.handlingMethod.getGenericReturnType());
        this.rawResponseType = ctPair.rawClass();
        this.responseType = ctPair.type();
        if (routingResponseType == null) {
            this.routingResponseType = responseType;
            this.rawRoutingResponseType = rawResponseType;
        } else {
            GenericType routingResponseGenericType = new GenericType(routingResponseType);
View Full Code Here

                handlerClass,
                handlingMethod.getDeclaringClass(),
                handlingMethod.getReturnType(),
                handlingMethod.getGenericReturnType());
        this.rawResponseType = ctPair.rawClass();
        this.responseType = ctPair.type();

        this.parameters = Collections.unmodifiableList(Parameter.create(
                handlerClass, handlingMethod.getDeclaringClass(), handlingMethod, encodedParameters));
    }
View Full Code Here

                annotations,
                paramAnnotation,
                paramSource,
                paramName,
                ct.rawClass(),
                ct.type(),
                paramEncoded,
                paramDefault);
    }

    private static List<Parameter> create(
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.