Java Code Examples for com.github.javaparser.ast.body.Parameter#isAnnotationPresent()

The following examples show how to use com.github.javaparser.ast.body.Parameter#isAnnotationPresent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ParameterHelper.java    From apigcc with MIT License 5 votes vote down vote up
public static boolean isRequestParam(Parameter parameter) {
    if (!parameter.isAnnotationPresent(ANNOTATION_PATH_VARIABLE) &&
            !parameter.isAnnotationPresent(ANNOTATION_REQUEST_BODY) &&
            !parameter.isAnnotationPresent(ANNOTATION_REQUEST_HEADER) &&
            !parameter.isAnnotationPresent(ANNOTATION_COOKIE_VALUE) &&
            !parameter.isAnnotationPresent(ANNOTATION_REQUEST_PART) &&
            !parameter.isAnnotationPresent(ANNOTATION_MULTIPART_FILE) &&
            !parameter.isAnnotationPresent(ANNOTATION_REQUEST_ATTRIBUTE)) {
        return true;
    }
    return false;
}
 
Example 2
Source File: ParameterHelper.java    From apigcc with MIT License 4 votes vote down vote up
public static boolean isPathVariable(Parameter parameter) {
    if (parameter.isAnnotationPresent(ANNOTATION_PATH_VARIABLE)) {
        return true;
    }
    return false;
}
 
Example 3
Source File: ParameterHelper.java    From apigcc with MIT License 4 votes vote down vote up
public static boolean isRequestBody(Parameter parameter) {
    if (parameter.isAnnotationPresent(ANNOTATION_REQUEST_BODY)) {
        return true;
    }
    return false;
}
 
Example 4
Source File: ParameterHelper.java    From apigcc with MIT License 4 votes vote down vote up
public static boolean isRequestHeader(Parameter parameter) {
    if (parameter.isAnnotationPresent(ANNOTATION_REQUEST_HEADER)) {
        return true;
    }
    return false;
}