Package org.restlet.ext.jaxrs.internal.exceptions

Examples of org.restlet.ext.jaxrs.internal.exceptions.ImplementationException


            try {
                final Object[] args = this.constructorParameters.get();
                instance = WrapperUtil.createInstance(this.constructor, args);
            } catch (ConvertRepresentationException e) {
                // is (or should be :-) ) not possible
                throw new ImplementationException("Must not be possible", e);
            }
        }
        final ResourceObject rootResourceObject;
        rootResourceObject = new ResourceObject(instance, this);
        try {
View Full Code Here


     * @param pathRegExp
     *            must not be null.
     */
    AbstractJaxRsWrapper(PathRegExp pathRegExp) throws ImplementationException {
        if (pathRegExp == null) {
            throw new ImplementationException("The PathRegExp must not be null");
        }
        this.pathRegExp = pathRegExp;
    }
View Full Code Here

            return (new boolean[0]).getClass();
        }
        if (genCompType instanceof Class<?>) {
            return Array.newInstance((Class<?>) genCompType, 0).getClass();
        }
        throw new ImplementationException("Sorry, could not handle a "
                + forMessage.getClass());
        // LATER could not handle all classes
    }
View Full Code Here

                        if (gsatpn instanceof ParameterizedType) {
                            final Type rawType = ((ParameterizedType) gsatpn)
                                    .getRawType();
                            if (rawType instanceof Class<?>)
                                return (Class<?>) rawType;
                            throw new ImplementationException(
                                    "Sorry, don't know how to return the class here");
                        }
                        if (gsatpn instanceof GenericArrayType) {
                            Type genCompType = ((GenericArrayType) gsatpn)
                                    .getGenericComponentType();
View Full Code Here

            throws ProviderNotInitializableException {
        Object jaxRsProvider;
        try {
            jaxRsProvider = createInstance();
        } catch (IllegalConstrParamTypeException e) {
            throw new ImplementationException(
                    "The provider could not be instantiated, but this could not be here",
                    e);
        } catch (IllegalPathParamTypeException e) {
            throw new ImplementationException(
                    "The provider could not be instantiated, but this could not be here",
                    e);
        } catch (IllegalArgumentException e) {
            throw new ImplementationException(
                    "The provider could not be instantiated, but this could not be here",
                    e);
        } catch (WebApplicationException e) {
            throw new ImplementationException(
                    "The provider could not be instantiated, but this could not be here",
                    e);
        } catch (MissingAnnotationException e) {
            throw new ImplementationException(
                    "The provider could not be instantiated, but this could not be here",
                    e);
        } catch (MissingConstructorException e) {
            throw new ImplementationException(
                    "The provider could not be instantiated, but this could not be here",
                    e);
        } catch (InvocationTargetException e) {
            throw new ImplementationException(
                    "The provider could not be instantiated, but this could not be here",
                    e);
        } catch (InstantiateException e) {
            throw new ImplementationException(
                    "The provider could not be instantiated, but this could not be here",
                    e);
        }
        try {
            initProvider(jaxRsProvider, tlContext, allProviders,
View Full Code Here

            Type genericType, Annotation[] annotations, MediaType mediaType,
            MultivaluedMap<String, String> httpResponseHeaders,
            InputStream entityStream) throws IOException {
        final Class<?> clazz = Util.getGenericClass(genericType);
        if (clazz == null) {
            throw new ImplementationException(
                    "The JaxbElement provider has gotten a type it could not unmarshal. Perhaps is the JaxbElementProvider not consistent to itself.");
        }
        try {
            final JAXBContext jaxbContext = getJaxbContext(clazz);
            final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
View Full Code Here

                || declaringClass.equals(HttpHeaders.class)
                || declaringClass.equals(Request.class)) {
            return tlContext;
        }
        if (declaringClass.equals(UriInfo.class)) {
            throw new ImplementationException(
                    "You must not call the method ContextInjector.getInjectObject(.......) with class UriInfo");
        }
        String declaringClassName = declaringClass.getName();
        // compare names to avoid ClassNotFoundExceptions, if the Servlet-API is
        // not in the classpath
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(
            Class<T> causeClass) {
        if (causeClass == null)
            throw new ImplementationException(
                    "The call of an exception mapper with null is not allowed");
        ProviderWrapper mapperWrapper;
        for (;;) {
            mapperWrapper = this.excMappers.get(causeClass);
            if (mapperWrapper != null) {
View Full Code Here

TOP

Related Classes of org.restlet.ext.jaxrs.internal.exceptions.ImplementationException

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.