Package javax.ws.rs.core

Examples of javax.ws.rs.core.GenericType


        final Representation rt = wadlGeneratorDelegate.createRequestRepresentation(ar, arm, mt);

        for (Parameter p : arm.getInvocable().getParameters()) {
            if (p.getSource() == Parameter.Source.ENTITY) {
                nameCallbacks.add(new TypeCallbackPair(
                        new GenericType(p.getType()),
                        new NameCallbackSetter() {
                            @Override
                            public void setName(QName name) {
                                rt.setElement(name);
                            }
View Full Code Here


            for (Response response : responses) {
                for (final Representation representation : response.getRepresentation()) {

                    // Process each representation
                    nameCallbacks.add(new TypeCallbackPair(
                            new GenericType(resourceMethod.getInvocable().getResponseType()),
                            new NameCallbackSetter() {

                                public void setName(QName name) {
                                    representation.setElement(name);
                                }
View Full Code Here

        // include any @XmlSeeAlso references.

        Set<Class> classSet = new HashSet<Class>(seeAlsoClasses);

        for (TypeCallbackPair pair : nameCallbacks) {
            final GenericType genericType = pair.genericType;
            Class<?> clazz = genericType.getRawType();

            // Is this class itself interesting?

            if (clazz.getAnnotation(XmlRootElement.class) != null) {
                classSet.add(clazz);
            } else if (SPECIAL_GENERIC_TYPES.contains(clazz)) {

                Type type = genericType.getType();
                if (type instanceof ParameterizedType) {
                    Type parameterType = ((ParameterizedType) type).getActualTypeArguments()[0];
                    if (parameterType instanceof Class) {
                        classSet.add((Class) parameterType);
                    }
View Full Code Here

                    // TODO: should at least log some warning here
                }
            }
        }

        GenericType responseGenericType = new GenericType(method.getGenericReturnType());
        if (entity != null) {
            if (entityType instanceof ParameterizedType) {
                entity = new GenericEntity(entity, entityType);
            }
            result = b.method(httpMethod, Entity.entity(entity, contentType), responseGenericType);
View Full Code Here

TOP

Related Classes of javax.ws.rs.core.GenericType

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.