Example usage for org.eclipse.jdt.internal.compiler.lookup FieldBinding genericSignature

List of usage examples for org.eclipse.jdt.internal.compiler.lookup FieldBinding genericSignature

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup FieldBinding genericSignature.

Prototype

public char[] genericSignature() 

Source Link

Document

X t --> LX;

Usage

From source file:com.codenvy.ide.ext.java.server.TypeBindingConvector.java

License:Open Source License

private static JsonElement toJsonField(FieldBinding field) {
    JsonObject object = new JsonObject();
    object.addProperty("modifiers", field.modifiers);
    object.add("constant", BinaryTypeConvector.toJsonConstant(field.constant()));
    object.add("genericSignature", field.genericSignature() == null ? JsonNull.INSTANCE
            : new JsonPrimitive(new String(field.genericSignature())));
    object.add("name", field.name == null ? JsonNull.INSTANCE : new JsonPrimitive(new String(field.name)));
    object.addProperty("tagBits", String.valueOf(field.tagBits));
    object.add("typeName",
            field.type == null ? JsonNull.INSTANCE : new JsonPrimitive(new String(field.type.signature())));
    object.add("annotations", toJsonAnnotations(field.getAnnotations()));
    return object;
}