@Test(expected = UnsupportedOperationException.class) public void mappingShouldBeUnmodifiable(){ CRestAnnotations.getMapping().clear(); }
public static Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> getMapping(){ Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> handlers = new HashMap<Class<? extends Annotation>, Class<? extends AnnotationHandler>>(); handlers.put(ConnectionTimeout.class, ConnectionTimeoutAnnotationHandler.class); handlers.put(Consumes.class, ConsumesAnnotationHandler.class); handlers.put(CookieParam.class, CookieParamAnnotationHandler.class); handlers.put(CookieParams.class, CookieParamsAnnotationHandler.class); handlers.put(DELETE.class, DELETEAnnotationHandler.class); handlers.put(Encoded.class, EncodedAnnotationHandler.class); handlers.put(Encoding.class, EncodingAnnotationHandler.class); handlers.put(EndPoint.class, EndPointAnnotationHandler.class); handlers.put(EntityWriter.class, EntityWriterAnnotationHandler.class); handlers.put(ErrorHandler.class, ErrorHandlerAnnotationHandler.class); handlers.put(FormParam.class, FormParamAnnotationHandler.class); handlers.put(FormParams.class, FormParamsAnnotationHandler.class); handlers.put(GET.class, GETAnnotationHandler.class); handlers.put(HEAD.class, HEADAnnotationHandler.class); handlers.put(HeaderParam.class, HeaderParamAnnotationHandler.class); handlers.put(HeaderParams.class, HeaderParamsAnnotationHandler.class); handlers.put(ListSeparator.class, ListSeparatorAnnotationHandler.class); handlers.put(MatrixParam.class, MatrixParamAnnotationHandler.class); handlers.put(MatrixParams.class, MatrixParamsAnnotationHandler.class); handlers.put(MultiPartParam.class, MultiPartParamAnnotationHandler.class); handlers.put(MultiPartParams.class, MultiPartParamsAnnotationHandler.class); handlers.put(OPTIONS.class, OPTIONSAnnotationHandler.class); handlers.put(Path.class, PathAnnotationHandler.class); handlers.put(PathParam.class, PathParamAnnotationHandler.class); handlers.put(PathParams.class, PathParamsAnnotationHandler.class); handlers.put(POST.class, POSTAnnotationHandler.class); handlers.put(Produces.class, ProducesAnnotationHandler.class); handlers.put(PUT.class, PUTAnnotationHandler.class); handlers.put(QueryParam.class, QueryParamAnnotationHandler.class); handlers.put(QueryParams.class, QueryParamsAnnotationHandler.class); handlers.put(RequestInterceptor.class, RequestInterceptorAnnotationHandler.class); handlers.put(ResponseHandler.class, ResponseHandlerAnnotationHandler.class); handlers.put(RetryHandler.class, RetryHandlerAnnotationHandler.class); handlers.put(Serializer.class, SerializerAnnotationHandler.class); handlers.put(SocketTimeout.class, SocketTimeoutAnnotationHandler.class); handlers.put(Deserializer.class, DeserializerAnnotationHandler.class); return Collections.unmodifiableMap(handlers); }
CRestAnnotations { public static Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> getMapping(){ Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> handlers = new HashMap<Class<? extends Annotation>, Class<? extends AnnotationHandler>>(); handlers.put(ConnectionTimeout.class, ConnectionTimeoutAnnotationHandler.class); handlers.put(Consumes.class, ConsumesAnnotationHandler.class); handlers.put(CookieParam.class, CookieParamAnnotationHandler.class); handlers.put(CookieParams.class, CookieParamsAnnotationHandler.class); handlers.put(DELETE.class, DELETEAnnotationHandler.class); handlers.put(Encoded.class, EncodedAnnotationHandler.class); handlers.put(Encoding.class, EncodingAnnotationHandler.class); handlers.put(EndPoint.class, EndPointAnnotationHandler.class); handlers.put(EntityWriter.class, EntityWriterAnnotationHandler.class); handlers.put(ErrorHandler.class, ErrorHandlerAnnotationHandler.class); handlers.put(FormParam.class, FormParamAnnotationHandler.class); handlers.put(FormParams.class, FormParamsAnnotationHandler.class); handlers.put(GET.class, GETAnnotationHandler.class); handlers.put(HEAD.class, HEADAnnotationHandler.class); handlers.put(HeaderParam.class, HeaderParamAnnotationHandler.class); handlers.put(HeaderParams.class, HeaderParamsAnnotationHandler.class); handlers.put(ListSeparator.class, ListSeparatorAnnotationHandler.class); handlers.put(MatrixParam.class, MatrixParamAnnotationHandler.class); handlers.put(MatrixParams.class, MatrixParamsAnnotationHandler.class); handlers.put(MultiPartParam.class, MultiPartParamAnnotationHandler.class); handlers.put(MultiPartParams.class, MultiPartParamsAnnotationHandler.class); handlers.put(OPTIONS.class, OPTIONSAnnotationHandler.class); handlers.put(Path.class, PathAnnotationHandler.class); handlers.put(PathParam.class, PathParamAnnotationHandler.class); handlers.put(PathParams.class, PathParamsAnnotationHandler.class); handlers.put(POST.class, POSTAnnotationHandler.class); handlers.put(Produces.class, ProducesAnnotationHandler.class); handlers.put(PUT.class, PUTAnnotationHandler.class); handlers.put(QueryParam.class, QueryParamAnnotationHandler.class); handlers.put(QueryParams.class, QueryParamsAnnotationHandler.class); handlers.put(RequestInterceptor.class, RequestInterceptorAnnotationHandler.class); handlers.put(ResponseHandler.class, ResponseHandlerAnnotationHandler.class); handlers.put(RetryHandler.class, RetryHandlerAnnotationHandler.class); handlers.put(Serializer.class, SerializerAnnotationHandler.class); handlers.put(SocketTimeout.class, SocketTimeoutAnnotationHandler.class); handlers.put(Deserializer.class, DeserializerAnnotationHandler.class); return Collections.unmodifiableMap(handlers); } }
CRestAnnotations { public static Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> getMapping(){ Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> handlers = new HashMap<Class<? extends Annotation>, Class<? extends AnnotationHandler>>(); handlers.put(ConnectionTimeout.class, ConnectionTimeoutAnnotationHandler.class); handlers.put(Consumes.class, ConsumesAnnotationHandler.class); handlers.put(CookieParam.class, CookieParamAnnotationHandler.class); handlers.put(CookieParams.class, CookieParamsAnnotationHandler.class); handlers.put(DELETE.class, DELETEAnnotationHandler.class); handlers.put(Encoded.class, EncodedAnnotationHandler.class); handlers.put(Encoding.class, EncodingAnnotationHandler.class); handlers.put(EndPoint.class, EndPointAnnotationHandler.class); handlers.put(EntityWriter.class, EntityWriterAnnotationHandler.class); handlers.put(ErrorHandler.class, ErrorHandlerAnnotationHandler.class); handlers.put(FormParam.class, FormParamAnnotationHandler.class); handlers.put(FormParams.class, FormParamsAnnotationHandler.class); handlers.put(GET.class, GETAnnotationHandler.class); handlers.put(HEAD.class, HEADAnnotationHandler.class); handlers.put(HeaderParam.class, HeaderParamAnnotationHandler.class); handlers.put(HeaderParams.class, HeaderParamsAnnotationHandler.class); handlers.put(ListSeparator.class, ListSeparatorAnnotationHandler.class); handlers.put(MatrixParam.class, MatrixParamAnnotationHandler.class); handlers.put(MatrixParams.class, MatrixParamsAnnotationHandler.class); handlers.put(MultiPartParam.class, MultiPartParamAnnotationHandler.class); handlers.put(MultiPartParams.class, MultiPartParamsAnnotationHandler.class); handlers.put(OPTIONS.class, OPTIONSAnnotationHandler.class); handlers.put(Path.class, PathAnnotationHandler.class); handlers.put(PathParam.class, PathParamAnnotationHandler.class); handlers.put(PathParams.class, PathParamsAnnotationHandler.class); handlers.put(POST.class, POSTAnnotationHandler.class); handlers.put(Produces.class, ProducesAnnotationHandler.class); handlers.put(PUT.class, PUTAnnotationHandler.class); handlers.put(QueryParam.class, QueryParamAnnotationHandler.class); handlers.put(QueryParams.class, QueryParamsAnnotationHandler.class); handlers.put(RequestInterceptor.class, RequestInterceptorAnnotationHandler.class); handlers.put(ResponseHandler.class, ResponseHandlerAnnotationHandler.class); handlers.put(RetryHandler.class, RetryHandlerAnnotationHandler.class); handlers.put(Serializer.class, SerializerAnnotationHandler.class); handlers.put(SocketTimeout.class, SocketTimeoutAnnotationHandler.class); handlers.put(Deserializer.class, DeserializerAnnotationHandler.class); return Collections.unmodifiableMap(handlers); } private  CRestAnnotations(); }
CRestAnnotations { public static Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> getMapping(){ Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> handlers = new HashMap<Class<? extends Annotation>, Class<? extends AnnotationHandler>>(); handlers.put(ConnectionTimeout.class, ConnectionTimeoutAnnotationHandler.class); handlers.put(Consumes.class, ConsumesAnnotationHandler.class); handlers.put(CookieParam.class, CookieParamAnnotationHandler.class); handlers.put(CookieParams.class, CookieParamsAnnotationHandler.class); handlers.put(DELETE.class, DELETEAnnotationHandler.class); handlers.put(Encoded.class, EncodedAnnotationHandler.class); handlers.put(Encoding.class, EncodingAnnotationHandler.class); handlers.put(EndPoint.class, EndPointAnnotationHandler.class); handlers.put(EntityWriter.class, EntityWriterAnnotationHandler.class); handlers.put(ErrorHandler.class, ErrorHandlerAnnotationHandler.class); handlers.put(FormParam.class, FormParamAnnotationHandler.class); handlers.put(FormParams.class, FormParamsAnnotationHandler.class); handlers.put(GET.class, GETAnnotationHandler.class); handlers.put(HEAD.class, HEADAnnotationHandler.class); handlers.put(HeaderParam.class, HeaderParamAnnotationHandler.class); handlers.put(HeaderParams.class, HeaderParamsAnnotationHandler.class); handlers.put(ListSeparator.class, ListSeparatorAnnotationHandler.class); handlers.put(MatrixParam.class, MatrixParamAnnotationHandler.class); handlers.put(MatrixParams.class, MatrixParamsAnnotationHandler.class); handlers.put(MultiPartParam.class, MultiPartParamAnnotationHandler.class); handlers.put(MultiPartParams.class, MultiPartParamsAnnotationHandler.class); handlers.put(OPTIONS.class, OPTIONSAnnotationHandler.class); handlers.put(Path.class, PathAnnotationHandler.class); handlers.put(PathParam.class, PathParamAnnotationHandler.class); handlers.put(PathParams.class, PathParamsAnnotationHandler.class); handlers.put(POST.class, POSTAnnotationHandler.class); handlers.put(Produces.class, ProducesAnnotationHandler.class); handlers.put(PUT.class, PUTAnnotationHandler.class); handlers.put(QueryParam.class, QueryParamAnnotationHandler.class); handlers.put(QueryParams.class, QueryParamsAnnotationHandler.class); handlers.put(RequestInterceptor.class, RequestInterceptorAnnotationHandler.class); handlers.put(ResponseHandler.class, ResponseHandlerAnnotationHandler.class); handlers.put(RetryHandler.class, RetryHandlerAnnotationHandler.class); handlers.put(Serializer.class, SerializerAnnotationHandler.class); handlers.put(SocketTimeout.class, SocketTimeoutAnnotationHandler.class); handlers.put(Deserializer.class, DeserializerAnnotationHandler.class); return Collections.unmodifiableMap(handlers); } private  CRestAnnotations(); static Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> getMapping(); }
CRestAnnotations { public static Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> getMapping(){ Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> handlers = new HashMap<Class<? extends Annotation>, Class<? extends AnnotationHandler>>(); handlers.put(ConnectionTimeout.class, ConnectionTimeoutAnnotationHandler.class); handlers.put(Consumes.class, ConsumesAnnotationHandler.class); handlers.put(CookieParam.class, CookieParamAnnotationHandler.class); handlers.put(CookieParams.class, CookieParamsAnnotationHandler.class); handlers.put(DELETE.class, DELETEAnnotationHandler.class); handlers.put(Encoded.class, EncodedAnnotationHandler.class); handlers.put(Encoding.class, EncodingAnnotationHandler.class); handlers.put(EndPoint.class, EndPointAnnotationHandler.class); handlers.put(EntityWriter.class, EntityWriterAnnotationHandler.class); handlers.put(ErrorHandler.class, ErrorHandlerAnnotationHandler.class); handlers.put(FormParam.class, FormParamAnnotationHandler.class); handlers.put(FormParams.class, FormParamsAnnotationHandler.class); handlers.put(GET.class, GETAnnotationHandler.class); handlers.put(HEAD.class, HEADAnnotationHandler.class); handlers.put(HeaderParam.class, HeaderParamAnnotationHandler.class); handlers.put(HeaderParams.class, HeaderParamsAnnotationHandler.class); handlers.put(ListSeparator.class, ListSeparatorAnnotationHandler.class); handlers.put(MatrixParam.class, MatrixParamAnnotationHandler.class); handlers.put(MatrixParams.class, MatrixParamsAnnotationHandler.class); handlers.put(MultiPartParam.class, MultiPartParamAnnotationHandler.class); handlers.put(MultiPartParams.class, MultiPartParamsAnnotationHandler.class); handlers.put(OPTIONS.class, OPTIONSAnnotationHandler.class); handlers.put(Path.class, PathAnnotationHandler.class); handlers.put(PathParam.class, PathParamAnnotationHandler.class); handlers.put(PathParams.class, PathParamsAnnotationHandler.class); handlers.put(POST.class, POSTAnnotationHandler.class); handlers.put(Produces.class, ProducesAnnotationHandler.class); handlers.put(PUT.class, PUTAnnotationHandler.class); handlers.put(QueryParam.class, QueryParamAnnotationHandler.class); handlers.put(QueryParams.class, QueryParamsAnnotationHandler.class); handlers.put(RequestInterceptor.class, RequestInterceptorAnnotationHandler.class); handlers.put(ResponseHandler.class, ResponseHandlerAnnotationHandler.class); handlers.put(RetryHandler.class, RetryHandlerAnnotationHandler.class); handlers.put(Serializer.class, SerializerAnnotationHandler.class); handlers.put(SocketTimeout.class, SocketTimeoutAnnotationHandler.class); handlers.put(Deserializer.class, DeserializerAnnotationHandler.class); return Collections.unmodifiableMap(handlers); } private  CRestAnnotations(); static Map<Class<? extends Annotation>, Class<? extends AnnotationHandler>> getMapping();  }