List of usage examples for org.eclipse.jdt.internal.compiler.env IBinaryField getConstant
Constant getConstant();
From source file:com.codenvy.ide.ext.java.server.internal.core.BinaryField.java
License:Open Source License
public Object getConstant() throws JavaModelException { IBinaryField info = (IBinaryField) getElementInfo(); return convertConstant(info.getConstant()); }
From source file:org.eclipse.che.jdt.BinaryTypeConvector.java
License:Open Source License
private static JsonElement toJsonField(IBinaryField field) { JsonObject object = new JsonObject(); object.addProperty("modifiers", field.getModifiers()); object.add("constant", toJsonConstant(field.getConstant())); object.add("genericSignature", field.getGenericSignature() == null ? JsonNull.INSTANCE : new JsonPrimitive(new String(field.getGenericSignature()))); object.add("name", field.getName() == null ? JsonNull.INSTANCE : new JsonPrimitive(new String(field.getName()))); object.addProperty("tagBits", String.valueOf(field.getTagBits())); object.add("typeName", field.getTypeName() == null ? JsonNull.INSTANCE : new JsonPrimitive(new String(field.getTypeName()))); object.add("annotations", toJsonAnnotations(field.getAnnotations())); return object; }