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

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

Introduction

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

Prototype

boolean isClinit();

Source Link

Document

Answer whether the receiver represents a class initializer method.

Usage

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

License:Open Source License

private static JsonElement toJsonMethod(IBinaryMethod method) {
    JsonObject object = new JsonObject();
    object.addProperty("modifiers", method.getModifiers());
    object.addProperty("constructor", method.isConstructor());
    object.add("argumentNames", toJsonArrayString(method.getArgumentNames()));
    object.add("annotations", toJsonAnnotations(method.getAnnotations()));
    object.add("defaultValue", toJsonDefaultValue(method.getDefaultValue()));
    object.add("exceptionTypeNames", toJsonArrayString(method.getExceptionTypeNames()));
    object.add("genericSignature", method.getGenericSignature() == null ? JsonNull.INSTANCE
            : new JsonPrimitive(new String(method.getGenericSignature())));
    object.add("methodDescriptor", method.getMethodDescriptor() == null ? JsonNull.INSTANCE
            : new JsonPrimitive(new String(method.getMethodDescriptor())));
    object.add("parameterAnnotations", toJsonParameterAnnotations(method));
    object.add("selector", method.getSelector() == null ? JsonNull.INSTANCE
            : new JsonPrimitive(new String(method.getSelector())));
    object.addProperty("tagBits", String.valueOf(method.getTagBits()));
    object.addProperty("clinit", method.isClinit());
    return object;
}