Example usage for org.eclipse.jdt.internal.compiler.env IBinaryMethod getAnnotatedParametersCount

List of usage examples for org.eclipse.jdt.internal.compiler.env IBinaryMethod getAnnotatedParametersCount

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.env IBinaryMethod getAnnotatedParametersCount.

Prototype

int getAnnotatedParametersCount();

Source Link

Document

Answer the number of parameter annotations that can be retrieved using #getParameterAnnotations(int,char[]) .

Usage

From source file:org.eclipse.che.jdt.BinaryTypeConvector.java

License:Open Source License

private static JsonElement toJsonParameterAnnotations(IBinaryMethod method) {
    if (method.getAnnotatedParametersCount() != 0) {
        JsonArray array = new JsonArray();
        int parameterCount = Signature.getParameterCount(method.getMethodDescriptor());
        for (int i = 0; i < parameterCount; i++) {
            array.add(toJsonAnnotations(method.getParameterAnnotations(i)));
        }/*w  ww. j av  a  2 s.  c o m*/
        return array;
    } else
        return JsonNull.INSTANCE;
}