private boolean isDocAvailable(Annotation[] anns) { return AnnotationUtils.getAnnotation(anns, Description.class) != null || AnnotationUtils.getAnnotation(anns, Descriptions.class) != null; }
protected boolean keepEncoded(Annotation[] anns) { return AnnotationUtils.getAnnotation(anns, Encoded.class) != null || expectEncoded; }
private void checkSuspended() { if (annotatedMethod != null) { for (Annotation[] anns : annotatedMethod.getParameterAnnotations()) { if (AnnotationUtils.getAnnotation(anns, Suspended.class) != null) { async = true; break; } } } }
private void checkOneway() { if (annotatedMethod != null) { oneway = AnnotationUtils.getAnnotation(annotatedMethod.getAnnotations(), Oneway.class) != null; } } private void checkSuspended() {
private void checkOneway() { if (annotatedMethod != null) { oneway = AnnotationUtils.getAnnotation(annotatedMethod.getAnnotations(), Oneway.class) != null; } }
@SuppressWarnings("unchecked") @Override public <T> ParamConverter<T> getConverter(Class<T> cls, Type t, Annotation[] anns) { if (cls == String.class && AnnotationUtils.getAnnotation(anns, HeaderParam.class) == null && AnnotationUtils.getAnnotation(anns, CookieParam.class) == null) { return (ParamConverter<T>) new UrlEncodingParamConverter(encodeClientParametersList); } return null; }
@SuppressWarnings("unchecked") @Override public <T> ParamConverter<T> getConverter(Class<T> cls, Type t, Annotation[] anns) { if (cls == String.class && AnnotationUtils.getAnnotation(anns, HeaderParam.class) == null && AnnotationUtils.getAnnotation(anns, CookieParam.class) == null) { return (ParamConverter<T>) new UrlEncodingParamConverter(encodeClientParametersList); } return null; }
@SuppressWarnings("unchecked") @Override public <T> ParamConverter<T> getConverter(Class<T> cls, Type t, Annotation[] anns) { if (cls == String.class && AnnotationUtils.getAnnotation(anns, HeaderParam.class) == null && AnnotationUtils.getAnnotation(anns, CookieParam.class) == null) { return (ParamConverter<T>)new UrlEncodingParamConverter(encodeClientParametersList); } else { return null; } }
protected static Multipart getMultipart(OperationResourceInfo ori, int index) { Method aMethod = ori.getAnnotatedMethod(); return aMethod != null ? AnnotationUtils.getAnnotation( aMethod.getParameterAnnotations()[index], Multipart.class) : null; }
private static Multipart getMultipart(OperationResourceInfo ori, int index) { Method aMethod = ori.getAnnotatedMethod(); return aMethod != null ? AnnotationUtils.getAnnotation( aMethod.getParameterAnnotations()[index], Multipart.class) : null; }
protected static Multipart getMultipart(OperationResourceInfo ori, int index) { Method aMethod = ori.getAnnotatedMethod(); return aMethod != null ? AnnotationUtils.getAnnotation( aMethod.getParameterAnnotations()[index], Multipart.class) : null; }
protected Templates getAnnotationTemplates(Annotation[] anns) { Templates t = null; XSLTTransform ann = AnnotationUtils.getAnnotation(anns, XSLTTransform.class); if (ann != null) { t = annotationTemplates.get(ann.value()); } return t; }
private String getContentId(Annotation[] anns, int id) { Multipart part = AnnotationUtils.getAnnotation(anns, Multipart.class); if (part != null && !"".equals(part.value())) { return part.value(); } return id == 0 ? AttachmentUtil.BODY_ATTACHMENT_ID : Integer.toString(id); }
private String getContentId(Annotation[] anns, int id) { Multipart part = AnnotationUtils.getAnnotation(anns, Multipart.class); if (part != null && !"".equals(part.value())) { return part.value(); } return id == 0 ? AttachmentUtil.BODY_ATTACHMENT_ID : Integer.toString(id); }
private boolean isSupported(Class<?> type, Type genericType, Annotation[] anns, MediaType mt) { return mediaTypeSupported(mt) && (WELL_KNOWN_MULTIPART_CLASSES.contains(type) || Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type) && type != MultivaluedMap.class || AnnotationUtils.getAnnotation(anns, Multipart.class) != null || PropertyUtils.isTrue(mc.getContextualProperty(SUPPORT_TYPE_AS_MULTIPART))); }
private boolean isFormParameter(Parameter pm, Class<?> type, Annotation[] anns) { return ParameterType.FORM == pm.getType() || ParameterType.REQUEST_BODY == pm.getType() && AnnotationUtils.getAnnotation(anns, Multipart.class) != null && (InjectionUtils.isPrimitive(type) || type == InputStream.class); }
private boolean isFormParameter(Parameter pm, Class<?> type, Annotation[] anns) { return ParameterType.FORM == pm.getType() || ParameterType.REQUEST_BODY == pm.getType() && AnnotationUtils.getAnnotation(anns, Multipart.class) != null && (InjectionUtils.isPrimitive(type) || type == InputStream.class); }
private boolean isFormParameter(Parameter pm, Class<?> type, Annotation[] anns) { return ParameterType.FORM == pm.getType() || ParameterType.REQUEST_BODY == pm.getType() && AnnotationUtils.getAnnotation(anns, Multipart.class) != null && (InjectionUtils.isPrimitive(type) || type == InputStream.class); }
private boolean isFormRequest(OperationResourceInfo ori) { for (Parameter p : ori.getParameters()) { if (p.getType() == ParameterType.FORM || p.getType() == ParameterType.REQUEST_BODY && (getMethod(ori).getParameterTypes()[p.getIndex()] == MultivaluedMap.class || AnnotationUtils .getAnnotation(getMethod(ori).getParameterAnnotations()[p.getIndex()], Multipart.class) != null)) { return true; } } return false; }
private boolean isFormRequest(OperationResourceInfo ori) { for (Parameter p : ori.getParameters()) { if (p.getType() == ParameterType.FORM || p.getType() == ParameterType.REQUEST_BODY && (getMethod(ori).getParameterTypes()[p.getIndex()] == MultivaluedMap.class || AnnotationUtils .getAnnotation(getMethod(ori).getParameterAnnotations()[p.getIndex()], Multipart.class) != null)) { return true; } } return false; }