You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ca0588f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/helper/RestAnnotationHelper.java
annotationHelper.printError(enclosedElement, "The method to set a RestTemplate should have only one RestTemplate parameter on a " + TargetAnnotationHelper.annotationName(Rest.class) + " annotated interface");
if (!(firstParameter.asType().toString().equals(CanonicalNameConstants.STRING) && secondParameter.asType().toString().equals(CanonicalNameConstants.STRING))) {
871
+
valid.invalidate();
872
+
annotationHelper.printError(enclosedElement, "The method to set headers, cookies, or HTTP Basic Auth should have only String parameters on a " + TargetAnnotationHelper.annotationName(Rest.class) + " annotated interface");
873
+
}
859
874
} else {
860
875
valid.invalidate();
861
876
annotationHelper.printError(enclosedElement, "The method to set a RestTemplate should have only one RestTemplate parameter on a " + TargetAnnotationHelper.annotationName(Rest.class) + " annotated interface");
annotationHelper.printError(enclosedElement, "Only one getCookie(String) and one getHeader(String) method are allowed on a " + TargetAnnotationHelper.annotationName(Rest.class) + " annotated interface");
890
+
}
891
+
} else {
892
+
valid.invalidate();
893
+
annotationHelper.printError(enclosedElement, "Only getCookie(String) and getHeader(String) can return a String on a " + TargetAnnotationHelper.annotationName(Rest.class) + " annotated interface");
894
+
}
895
+
896
+
} else {
897
+
valid.invalidate();
898
+
annotationHelper.printError(enclosedElement, "The only methods that can return a String on a " + TargetAnnotationHelper.annotationName(Rest.class) + " annotated interface are getCookie(String) and getHeader(String)");
899
+
}
863
900
} else {
864
901
valid.invalidate();
865
902
annotationHelper.printError(enclosedElement, "All methods should be annotated in a " + TargetAnnotationHelper.annotationName(Rest.class) + " annotated interface, except the ones that returns or set a RestTemplate");
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/rest/GetPostProcessor.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/rest/GetProcessor.java
Copy file name to clipboardExpand all lines: AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/rest/HeadProcessor.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@
26
26
importcom.sun.codemodel.JClass;
27
27
importcom.sun.codemodel.JCodeModel;
28
28
importcom.sun.codemodel.JExpr;
29
-
importcom.sun.codemodel.JInvocation;
29
+
importcom.sun.codemodel.JExpression;
30
30
31
31
publicclassHeadProcessorextendsMethodProcessor {
32
32
@@ -55,7 +55,7 @@ public void process(Element element, JCodeModel codeModel, EBeanHolder holder) t
0 commit comments